note 124604 added to class.throwable
| From: | thisbug at foxmail dot com | Date: | Mon, 13 Jan 2020 02:57:48 +0000 |
| Subject: | note 124604 added to class.throwable | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-213869@lists.php.net to get a copy of this message | ||
try {
// Code that may throw an Exception or Error.
} catch (Throwable $t) {
// Executed only in PHP 7, will not match in PHP 5.x
} catch (Exception $e) {
// Executed only in PHP 5.x, will not be reached in PHP 7
}
interface MyPackageThrowable extends Throwable {}
class MyPackageException extends Exception implements MyPackageThrowable {}
throw new MyPackageException();
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.168 (proxied: 61.51.95.210)
----
Manual Page -- http://php.net/manual/en/class.throwable.php
Edit -- https://master.php.net/note/edit/124604
Del: integrated -- https://master.php.net/note/delete/124604/integrated
Del: useless -- https://master.php.net/note/delete/124604/useless
Del: bad code -- https://master.php.net/note/delete/124604/bad+code
Del: spam -- https://master.php.net/note/delete/124604/spam
Del: non-english -- https://master.php.net/note/delete/124604/non-english
Del: in docs -- https://master.php.net/note/delete/124604/in+docs
Del: other reasons-- https://master.php.net/note/delete/124604
Reject -- https://master.php.net/note/reject/124604
Search -- https://master.php.net/manage/user-notes.php