Exception::getPreviousReturns previous Exception Description
final public Throwable Exception::getPrevious
( void
)
Returns previous exception (the third parameter of Exception::__construct). ParametersThis function has no parameters. Return Values
Returns the previous Throwable if available
or Changelog
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] See Also
|