4 * This file is part of Psy Shell.
6 * (c) 2012-2017 Justin Hileman
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Psy\Exception;
15 * A throw-up exception, used for throwing an exception out of the Psy Shell.
17 class ThrowUpException extends \Exception implements Exception
22 public function __construct(\Exception $exception)
24 $message = sprintf("Throwing %s with message '%s'", get_class($exception), $exception->getMessage());
25 parent::__construct($message, $exception->getCode(), $exception);
29 * Return a raw (unformatted) version of the error message.
33 public function getRawMessage()
35 return $this->getPrevious()->getMessage();