Changeset 255 for trunk/ext

Show
Ignore:
Timestamp:
03/05/2007 12:09:46 (21 months ago)
Author:
indeyets
Message:

better message in exception

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ext/php/phpext.c

    r254 r255  
    211211void php_syck_ehandler(SyckParser *p, char *str) 
    212212{ 
     213        char *endl = p->cursor; 
    213214        TSRMLS_FETCH(); 
    214         zend_throw_exception(syck_exception_entry, str, 0 TSRMLS_CC); 
     215 
     216        while (*endl != '\0' && *endl != '\n') 
     217                endl++; 
     218 
     219        endl[0] = '\0'; 
     220 
     221        zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "%s on line %d, col %d: '%s'", str, p->linect, p->cursor - p->lineptr, p->lineptr); 
    215222} 
    216223