0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-09-16 19:15:17 +00:00

PHP7 adapt: changed fatal error messages

This commit is contained in:
Stefan Siegl 2015-08-29 21:21:43 +02:00
parent eca7656b7d
commit 11155a6a51
5 changed files with 37 additions and 5 deletions

View File

@ -27,4 +27,10 @@ $js->executeString("PHP.foo();");
--EXPECTF--
nothing.
Fatal error: Call to a member function foo() on %s in %s%efatal_error_no_uninstall_inner_frame.php on line 15
Fatal error: Uncaught Error: Call to a member function foo() on null in %s%efatal_error_no_uninstall_inner_frame.php:15
Stack trace:
#0 [internal function]: {closure}()
#1 [internal function]: Closure->__invoke()
#2 %s%efatal_error_no_uninstall_inner_frame.php(18): V8Js->executeString('PHP.foo();')
#3 {main}
thrown in %s%efatal_error_no_uninstall_inner_frame.php on line 15

View File

@ -35,4 +35,16 @@ $js->executeString("PHP.nofail(); PHP.foo();");
foo
foo
Fatal error: Call to a member function bar() on %s in %s%efatal_error_recursive.php on line 7
Fatal error: Uncaught Error: Call to a member function bar() on null in %s%efatal_error_recursive.php:7
Stack trace:
#0 [internal function]: {closure}()
#1 [internal function]: Closure->__invoke()
#2 %s%efatal_error_recursive.php(12): V8Js->executeString('PHP.baz();')
#3 [internal function]: {closure}()
#4 [internal function]: Closure->__invoke()
#5 %s%efatal_error_recursive.php(17): V8Js->executeString('PHP.bar();')
#6 [internal function]: {closure}()
#7 [internal function]: Closure->__invoke()
#8 %s%efatal_error_recursive.php(25): V8Js->executeString('PHP.nofail(); P...')
#9 {main}
thrown in %s%efatal_error_recursive.php on line 7

View File

@ -23,4 +23,10 @@ $js->executeString($script);
?>
===EOF===
--EXPECTF--
Fatal error: Call to a member function bar() on %s in %s%efatal_error_rethrow.php on line 7
Fatal error: Uncaught Error: Call to a member function bar() on %s in %s%efatal_error_rethrow.php:7
Stack trace:
#0 [internal function]: {closure}()
#1 [internal function]: Closure->__invoke()
#2 /home/stesie/Projekte/v8js-php7/tests/fatal_error_rethrow.php(16): V8Js->executeString('\nPHP.foo();\n')
#3 {main}
thrown in /home/stesie/Projekte/v8js-php7/tests/fatal_error_rethrow.php on line 7

View File

@ -29,4 +29,7 @@ $bar->foo();
--EXPECTF--
nothing.
Fatal error: Call to a member function foo() on %s in %s%efatal_error_uninstall_in_first_frame.php on line 20
Fatal error: Uncaught Error: Call to a member function foo() on null in %s%efatal_error_uninstall_in_first_frame.php:20
Stack trace:
#0 {main}
thrown in %s%efatal_error_uninstall_in_first_frame.php on line 20

View File

@ -23,4 +23,9 @@ $cb();
--EXPECTF--
goodbye cruel world!
Fatal error: Call to undefined method Foo::bar() in %s
Fatal error: Uncaught Error: Call to undefined method Foo::bar() in %s%efatal_error_v8function.php:6
Stack trace:
#0 [internal function]: Foo->callback()
#1 %s%efatal_error_v8function.php(14): V8Function->V8Js::V8::Invoke()
#2 {main}
thrown in %s%efatal_error_v8function.php on line 6