mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
More output magic on nested exceptions
This commit is contained in:
parent
24ec6e5a5c
commit
1fb65c4c29
1 changed files with 3 additions and 2 deletions
|
@ -176,9 +176,10 @@ class PEAR_Exception extends Exception
|
|||
|
||||
private function _getCauseMessage()
|
||||
{
|
||||
$msg = ' ' . $this->_method . " at {$this->file} ({$this->line})\n";
|
||||
$msg = " #{$this->_method} at {$this->file} ({$this->line})\n" .
|
||||
" {$this->message}\n";
|
||||
if ($this->cause instanceof Exception) {
|
||||
return $msg . $this->cause->_getCauseMessage();
|
||||
return $this->cause->_getCauseMessage() . $msg;
|
||||
}
|
||||
return $msg;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue