Просмотр исходного кода

PHP7 adapt: changed fatal error messages

Stefan Siegl 9 лет назад
Родитель
Сommit
11155a6a51

+ 7 - 1
tests/fatal_error_no_uninstall_inner_frame.phpt

@@ -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

+ 13 - 1
tests/fatal_error_recursive.phpt

@@ -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

+ 7 - 1
tests/fatal_error_rethrow.phpt

@@ -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

+ 4 - 1
tests/fatal_error_uninstall_in_first_frame.phpt

@@ -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

+ 6 - 1
tests/fatal_error_v8function.phpt

@@ -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