diff options
author | Aaron Piotrowski <aaron@trowski.com> | 2015-05-16 15:30:59 -0500 |
---|---|---|
committer | Aaron Piotrowski <aaron@trowski.com> | 2015-05-16 15:30:59 -0500 |
commit | d042d0880796cfe99262bb6fa44225e984c63ace (patch) | |
tree | eb428c9c3d43c4ab9c230b86eeaceccd01e42120 /Zend/zend_language_scanner.c | |
parent | c9f27ee4227268bc74fc54e0e06102317e614804 (diff) | |
download | php-git-d042d0880796cfe99262bb6fa44225e984c63ace.tar.gz |
Remodel exceptions based on Throwable interface
Added Throwable interface that exceptions must
implement in order to be thrown. BaseException
was removed, EngineException renamed to
Error, and TypeException and ParseException
renamed to TypeError and ParseError. Exception
and Error no longer extend a common base
class, rather they both implement the Throwable
interface.
Diffstat (limited to 'Zend/zend_language_scanner.c')
-rw-r--r-- | Zend/zend_language_scanner.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c index abf93d587c..e3b2de1a79 100644 --- a/Zend/zend_language_scanner.c +++ b/Zend/zend_language_scanner.c @@ -998,7 +998,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot } if (!valid) { - zend_throw_exception(zend_get_parse_exception(), + zend_throw_exception(zend_get_parse_error(), "Invalid UTF-8 codepoint escape sequence", E_PARSE); zval_ptr_dtor(zendlval); return FAILURE; @@ -1009,7 +1009,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot /* per RFC 3629, UTF-8 can only represent 21 bits */ if (codepoint > 0x10FFFF || errno) { - zend_throw_exception(zend_get_parse_exception(), + zend_throw_exception(zend_get_parse_error(), "Invalid UTF-8 codepoint escape sequence: Codepoint too large", E_PARSE); zval_ptr_dtor(zendlval); return FAILURE; @@ -2720,7 +2720,7 @@ yy136: * Because the lexing itself doesn't do that for us */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE); + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); return T_ERROR; } } else { @@ -2736,7 +2736,7 @@ yy136: } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); return T_ERROR; } @@ -2745,7 +2745,7 @@ yy136: } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { - zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE); + zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE); return T_ERROR; } } |