note 115813 added to class.exception
| From: | cHao | Date: | Sat, 27 Sep 2014 18:34:53 +0000 |
| Subject: | note 115813 added to class.exception | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200537@lists.php.net to get a copy of this message | ||
Note that an exception's properties are populated when the exception is *created*, not when it
is thrown. Throwing the exception does not seem to modify them.
Among other things, this means:
* The exception will blame the line that created it, not the line that threw it.
* Unlike in some other languages, rethrowing an exception doesn't muck up the trace.
* A thrown exception and an unthrown one look basically identical. On my machine, the only visible
difference is that a thrown exception has an
xdebug_message property while an unthrown
one doesn't. Of course, if you don't have xdebug installed, you won't even get that.
----
Server IP: 72.52.91.14
Probable Submitter: 2001:470:7:7db::2
----
Manual Page -- http://php.net/manual/en/class.exception.php
Edit -- https://master.php.net/note/edit/115813
Del: integrated -- https://master.php.net/note/delete/115813/integrated
Del: useless -- https://master.php.net/note/delete/115813/useless
Del: bad code -- https://master.php.net/note/delete/115813/bad+code
Del: spam -- https://master.php.net/note/delete/115813/spam
Del: non-english -- https://master.php.net/note/delete/115813/non-english
Del: in docs -- https://master.php.net/note/delete/115813/in+docs
Del: other reasons-- https://master.php.net/note/delete/115813
Reject -- https://master.php.net/note/reject/115813
Search -- https://master.php.net/manage/user-notes.php