0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 14:01:53 +00:00

Create deprecated warning if setting $report_uncaught_exceptions != true

This commit is contained in:
Stefan Siegl 2017-09-25 14:35:46 +02:00
parent 56e83a9fbb
commit 82930c9ea9
No known key found for this signature in database
GPG Key ID: 51575950154839CD
4 changed files with 10 additions and 1 deletions

View File

@ -21,6 +21,8 @@ var_dump($v8->getPendingException());
?> ?>
===EOF=== ===EOF===
--EXPECTF-- --EXPECTF--
Deprecated: V8Js::__construct(): Disabling exception reporting is deprecated, $report_uncaught_exceptions != true in %s%eexception_clearing.php on line 3
Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_clearing.php on line 5 Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_clearing.php on line 5
NULL NULL

View File

@ -38,6 +38,8 @@ try {
?> ?>
===EOF=== ===EOF===
--EXPECTF-- --EXPECTF--
Deprecated: V8Js::__construct(): Disabling exception reporting is deprecated, $report_uncaught_exceptions != true in %s%eexception_propagation_2.php on line 8
Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_propagation_2.php on line 11 Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_propagation_2.php on line 11
object(V8JsScriptException)#%d (13) { object(V8JsScriptException)#%d (13) {
["message":protected]=> ["message":protected]=>

View File

@ -31,7 +31,8 @@ try {
} }
?> ?>
===EOF=== ===EOF===
--EXPECT-- --EXPECTF--
Deprecated: V8Js::__construct(): Disabling exception reporting is deprecated, $report_uncaught_exceptions != true in %s%eexception_propagation_3.php on line 8
SyntaxError caught in JS! SyntaxError caught in JS!
To Bar! To Bar!
Error caught via PHP callback! Error caught via PHP callback!

View File

@ -357,6 +357,10 @@ static PHP_METHOD(V8Js, __construct)
ZVAL_NULL(&c->pending_exception); ZVAL_NULL(&c->pending_exception);
c->in_execution = 0; c->in_execution = 0;
if (report_uncaught != 1) {
php_error_docref(NULL, E_DEPRECATED, "Disabling exception reporting is deprecated, $report_uncaught_exceptions != true");
}
new (&c->create_params) v8::Isolate::CreateParams(); new (&c->create_params) v8::Isolate::CreateParams();
#ifdef USE_INTERNAL_ALLOCATOR #ifdef USE_INTERNAL_ALLOCATOR