Dispatcher.php 948 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. *
  4. * Cube Framework $Id$ zznEwS8sxzhx2PxPdsSqmI4X5Xjp/A8j9rC4HaQ8ZeU=
  5. *
  6. * @link http://codecu.be/framework
  7. * @copyright Copyright (c) 2015 CodeCube SRL
  8. * @license http://codecu.be/framework/license Commercial License
  9. *
  10. * @version 1.4
  11. */
  12. /**
  13. * exceptions class
  14. */
  15. namespace Cube\Exception;
  16. use Cube\Exception;
  17. class Dispatcher extends Exception
  18. {
  19. /**
  20. *
  21. * construct the exception
  22. *
  23. * @param string $message
  24. * @param int $code
  25. * @param \Exception $previous
  26. */
  27. public function __construct($message = null, $code = null, $previous = null)
  28. {
  29. parent::__construct($message, (int)$code, $previous);
  30. }
  31. /**
  32. *
  33. * display the exception
  34. *
  35. * @return string
  36. */
  37. public function display()
  38. {
  39. return '<div class="alert alert-danger">[Cube\Exception\Dispatcher]<br> ' . $this->getMessage() . '</div>';
  40. }
  41. }