]> granicus.if.org Git - php/commitdiff
More output magic on nested exceptions
authorTomas V.V.Cox <cox@php.net>
Mon, 21 Jun 2004 04:36:17 +0000 (04:36 +0000)
committerTomas V.V.Cox <cox@php.net>
Mon, 21 Jun 2004 04:36:17 +0000 (04:36 +0000)
pear/PEAR/Exception.php

index be6d5732018de10705ca7f14c6b9bc15663c5c77..8322fd034a2cc6837c23957932357290daea3df4 100644 (file)
@@ -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;
     }