diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-03-09 13:57:15 +0100 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-03-09 14:01:32 +0100 |
commit | 1c94ff0595bbe6f3df8058aff7252bda09dc4a15 (patch) | |
tree | efe488bc3292d544657fca92c4347c9b872931eb /Zend/tests/methods-on-non-objects-catch.phpt | |
parent | 2f156c61f19a889c8ed39fe8eb3b3220555db647 (diff) | |
download | php-git-1c94ff0595bbe6f3df8058aff7252bda09dc4a15.tar.gz |
Implement engine exceptions
RFC: https://wiki.php.net/rfc/engine_exceptions_for_php7
Pending changes regarding naming of BaseException and whether it
should be an interface.
Diffstat (limited to 'Zend/tests/methods-on-non-objects-catch.phpt')
-rw-r--r-- | Zend/tests/methods-on-non-objects-catch.phpt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Zend/tests/methods-on-non-objects-catch.phpt b/Zend/tests/methods-on-non-objects-catch.phpt index bbfadac107..b38da3657b 100644 --- a/Zend/tests/methods-on-non-objects-catch.phpt +++ b/Zend/tests/methods-on-non-objects-catch.phpt @@ -7,12 +7,15 @@ set_error_handler(function($code, $message) { }); $x= null; -var_dump($x->method()); +try { + var_dump($x->method()); +} catch (EngineException $e) { + var_dump($e->getCode(), $e->getMessage()); +} echo "Alive\n"; ?> --EXPECTF-- int(4096) string(%d) "Call to a member function method() on null" -NULL Alive |