You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
496 B

15 years ago
15 years ago
  1. <?php
  2. /**
  3. * \brief Movim's custom exception class.
  4. *
  5. * Merely adds a line break to the messages so far. Is expected to become more
  6. * useful in the future.
  7. */
  8. class MovimException extends Exception
  9. {
  10. /**
  11. * Forces to add a message.
  12. */
  13. public function __construct($message, $code = 0) {
  14. parent::__construct(t("Error: %s", $message), $code);
  15. }
  16. /**
  17. * Output proper html error reports.
  18. */
  19. function __toString() {
  20. return $this->code . ' - ' . $this->message . '<br />';
  21. }
  22. }
  23. ?>