note 87695 deleted from language.exceptions by googleguy

From: Date: Tue, 22 Oct 2013 08:03:35 +0000
Subject: note 87695 deleted from language.exceptions by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-196777@lists.php.net to get a copy of this message
Note Submitter: rctay89 at gmail dot com ---- The internal implementation of Exception.__toString is something like this: <?php class MyException extends Exception { public function __toString() { return "exception '".__CLASS__ ."' with message '".$this->getMessage()."' in ".$this->getFile().":".$this->getLine()."\nStack trace:\n".$this->getTraceAsString(); } } ?> Useful if you want to customize your exception toString format, but not to deviate too much from the built-in one.

« previous php.notes (#196777) next »