Changeset 5291
- Timestamp:
- 09/26/07 17:51:32 (2 years ago)
- Files:
-
- trunk/lib/exception/sfException.class.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/exception/sfException.class.php
r5139 r5291 23 23 class sfException extends Exception 24 24 { 25 protected 26 $wrappedException = null; 27 25 28 /** 26 29 * Wraps an Exception. … … 32 35 static public function createFromException(Exception $e) 33 36 { 34 return new sfException(sprintf('Wrapped %s: %s', get_class($e), $e->getMessage())); 37 $exception = new sfException(sprintf('Wrapped %s: %s', get_class($e), $e->getMessage())); 38 $exception->setWrappedException($e); 39 40 return $exception; 41 } 42 43 public function setWrappedException($e) 44 { 45 $this->wrappedException = $e; 35 46 } 36 47 … … 98 109 $name = get_class($this); 99 110 $format = 0 == strncasecmp(PHP_SAPI, 'cli', 3) ? 'plain' : 'html'; 100 $traces = self::getTraces( $this, $format);111 $traces = self::getTraces(is_null($this->wrappedException) ? $this : $this->wrappedException, $format); 101 112 102 113 // dump main objects values

