diff options
author | Marcus Boerger <helly@php.net> | 2004-02-22 18:50:47 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2004-02-22 18:50:47 +0000 |
commit | 1fbe07c9e0a7674710c4ae8eaa380ba1cb94f9d2 (patch) | |
tree | 96169c479448266301583623222d286388ffac18 /Zend/ZEND_CHANGES | |
parent | 4e4cb3fcd286e5f1aef04c5f0024efd10a2ae60b (diff) | |
download | php-git-1fbe07c9e0a7674710c4ae8eaa380ba1cb94f9d2.tar.gz |
Add some more obviously needed information
Diffstat (limited to 'Zend/ZEND_CHANGES')
-rw-r--r-- | Zend/ZEND_CHANGES | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Zend/ZEND_CHANGES b/Zend/ZEND_CHANGES index 78b0deb886..1b172eb91e 100644 --- a/Zend/ZEND_CHANGES +++ b/Zend/ZEND_CHANGES @@ -596,6 +596,32 @@ Changes in the Zend Engine 2.0 If you derive your exception classes from this Exception base class your exceptions will be nicely shown in the builtin handler for uncaught exceptions. + + Note: The method getMessage() is a final read only access method to + the private proeprty message that is set in the constructor. If you + feel a need to overwrite the exception display then overload method + __toString() in your derived class or implement your own extneral + exception display function to accomplish your desired formatting. + + Example: + + <?php + function display_exception(Exception $ex) + { + echo 'Exception: ' . $ex->getMessage() . 'with backtrace: <pre>'; + echo $ex->getTrace(); + echo '</pre>'; + } + + try + { + // your code here + } + catch (Exception $ex) + { + display_exeption($ex); + } + ?> * Dereferencing objects returned from functions. |