Mercurial > hg > cmmr2012-drupal-site
annotate vendor/psy/psysh/src/Exception/RuntimeException.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 /* |
Chris@0 | 4 * This file is part of Psy Shell. |
Chris@0 | 5 * |
Chris@0 | 6 * (c) 2012-2018 Justin Hileman |
Chris@0 | 7 * |
Chris@0 | 8 * For the full copyright and license information, please view the LICENSE |
Chris@0 | 9 * file that was distributed with this source code. |
Chris@0 | 10 */ |
Chris@0 | 11 |
Chris@0 | 12 namespace Psy\Exception; |
Chris@0 | 13 |
Chris@0 | 14 /** |
Chris@0 | 15 * A RuntimeException for Psy. |
Chris@0 | 16 */ |
Chris@0 | 17 class RuntimeException extends \RuntimeException implements Exception |
Chris@0 | 18 { |
Chris@0 | 19 private $rawMessage; |
Chris@0 | 20 |
Chris@0 | 21 /** |
Chris@0 | 22 * Make this bad boy. |
Chris@0 | 23 * |
Chris@0 | 24 * @param string $message (default: "") |
Chris@0 | 25 * @param int $code (default: 0) |
Chris@0 | 26 * @param \Exception $previous (default: null) |
Chris@0 | 27 */ |
Chris@0 | 28 public function __construct($message = '', $code = 0, \Exception $previous = null) |
Chris@0 | 29 { |
Chris@0 | 30 $this->rawMessage = $message; |
Chris@0 | 31 parent::__construct($message, $code, $previous); |
Chris@0 | 32 } |
Chris@0 | 33 |
Chris@0 | 34 /** |
Chris@0 | 35 * Return a raw (unformatted) version of the error message. |
Chris@0 | 36 * |
Chris@0 | 37 * @return string |
Chris@0 | 38 */ |
Chris@0 | 39 public function getRawMessage() |
Chris@0 | 40 { |
Chris@0 | 41 return $this->rawMessage; |
Chris@0 | 42 } |
Chris@0 | 43 } |