mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-23 02:51:51 +00:00
Merge pull request #190 from stesie/warn-only-on-v8-errors
Don't abort PHP on fatal V8 errors, just warn about it
This commit is contained in:
commit
362eb0b806
@ -36,4 +36,10 @@ array(2) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Fatal error: v8::Context::New() Circular extension dependency in %s on line 8
|
Warning: Fatal V8 error in v8::Context::New(): Circular extension dependency in %s on line 8
|
||||||
|
|
||||||
|
Fatal error: Uncaught V8JsException: Failed to create V8 context. Check that registered extensions do not have errors. in %s:8
|
||||||
|
Stack trace:
|
||||||
|
#0 %s(8): V8Js->__construct('myobj', Array, Array)
|
||||||
|
#1 {main}
|
||||||
|
thrown in %s on line 8
|
||||||
|
@ -303,14 +303,10 @@ static int v8js_create_ext_strarr(const char ***retval, int count, HashTable *ht
|
|||||||
|
|
||||||
static void v8js_fatal_error_handler(const char *location, const char *message) /* {{{ */
|
static void v8js_fatal_error_handler(const char *location, const char *message) /* {{{ */
|
||||||
{
|
{
|
||||||
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
|
||||||
if (isolate) {
|
|
||||||
isolate->Exit();
|
|
||||||
}
|
|
||||||
if (location) {
|
if (location) {
|
||||||
zend_error(E_ERROR, "%s %s", location, message);
|
zend_error(E_WARNING, "Fatal V8 error in %s: %s", location, message);
|
||||||
} else {
|
} else {
|
||||||
zend_error(E_ERROR, "%s", message);
|
zend_error(E_WARNING, "Fatal V8 error: %s", message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
Loading…
Reference in New Issue
Block a user