PHP ManualException::getPrevious(PHP 5 >= 5.3.0) Exception::getPrevious — Returns previous Exception DescriptionReturns previous Exception (the third parameter of Exception::__construct()). ParametersThis function has no parameters. Return Values
Returns the previous Exception if available
or Examples
Example #1 Exception::getPrevious() example Looping over, and printing out, exception trace.
<?php The above example will output something similar to: /home/bjori/ex.php:8 Something happened (911) [MyCustomException] /home/bjori/ex.php:6 You are doing it wrong! (112) [InvalidArgumentException]
![]() |
PHP-Index
New Tutorial entries
|