暫無描述

RuntimeException.php 963B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /*
  3. * This file is part of Psy Shell.
  4. *
  5. * (c) 2012-2018 Justin Hileman
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Psy\Exception;
  11. /**
  12. * A RuntimeException for Psy.
  13. */
  14. class RuntimeException extends \RuntimeException implements Exception
  15. {
  16. private $rawMessage;
  17. /**
  18. * Make this bad boy.
  19. *
  20. * @param string $message (default: "")
  21. * @param int $code (default: 0)
  22. * @param \Exception $previous (default: null)
  23. */
  24. public function __construct($message = '', $code = 0, \Exception $previous = null)
  25. {
  26. $this->rawMessage = $message;
  27. parent::__construct($message, $code, $previous);
  28. }
  29. /**
  30. * Return a raw (unformatted) version of the error message.
  31. *
  32. * @return string
  33. */
  34. public function getRawMessage()
  35. {
  36. return $this->rawMessage;
  37. }
  38. }