diff options
author | Nikita Popov <nikic@php.net> | 2015-05-17 18:59:34 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-05-17 19:54:12 +0200 |
commit | 440481fb3e15d78d0d92432c3adba9067989f43a (patch) | |
tree | 9a083b31d5b1987a09f0f36589099c01181cd7ed /tests/lang | |
parent | 3ae995f03c8f60c4a4c9718262545cf5a6a08da3 (diff) | |
download | php-git-440481fb3e15d78d0d92432c3adba9067989f43a.tar.gz |
Display TypeExceptions like normal exceptions
We currently don't show the argument at which the error actually
occured in the trace - should probably either add it or don't
display args on incomplete frames altogether, otherwise this'll
probably be confusing.
Diffstat (limited to 'tests/lang')
-rw-r--r-- | tests/lang/bug24658.phpt | 7 | ||||
-rw-r--r-- | tests/lang/catchable_error_001.phpt | 6 | ||||
-rw-r--r-- | tests/lang/type_hints_001.phpt | 6 |
3 files changed, 16 insertions, 3 deletions
diff --git a/tests/lang/bug24658.phpt b/tests/lang/bug24658.phpt index 635eb8cd0c..236d8ed394 100644 --- a/tests/lang/bug24658.phpt +++ b/tests/lang/bug24658.phpt @@ -53,4 +53,9 @@ int(2) object(foo)#%d (0) { } -Fatal error: Argument 1 passed to typehint() must be an instance of foo, integer given in %s on line %d +Fatal error: Uncaught TypeException: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d +Stack trace: +#0 [internal function]: typehint(1) +#1 %s(%d): array_walk(Array, 'typehint') +#2 {main} + thrown in %s on line %d diff --git a/tests/lang/catchable_error_001.phpt b/tests/lang/catchable_error_001.phpt index e3e3692440..f58b26e847 100644 --- a/tests/lang/catchable_error_001.phpt +++ b/tests/lang/catchable_error_001.phpt @@ -19,4 +19,8 @@ Catchable fatal error [1] echo "ALIVE!\n"; ?> --EXPECTF-- -Fatal error: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php on line 5 +Fatal error: Uncaught TypeException: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5 +Stack trace: +#0 %s(%d): blah() +#1 {main} + thrown in %scatchable_error_001.php on line 5 diff --git a/tests/lang/type_hints_001.phpt b/tests/lang/type_hints_001.phpt index 48004ba97f..71ef9f30c3 100644 --- a/tests/lang/type_hints_001.phpt +++ b/tests/lang/type_hints_001.phpt @@ -23,4 +23,8 @@ type_hint_foo($bar); ?> --EXPECTF-- -Fatal error: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s on line 9 +Fatal error: Uncaught TypeException: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s:9 +Stack trace: +#0 %s(%d): type_hint_foo() +#1 {main} + thrown in %s on line 9 |