SystemException.class.php 528 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * System exception
  4. *
  5. * Thrown if:
  6. * - system error occured
  7. * - unpredictable scenarios
  8. *
  9. * @author Malishev Dima <dima.malishev@gmail.com>
  10. * @author vesta, http://vestacp.com/
  11. * @copyright vesta 2010-2011
  12. */
  13. class SystemException extends Exception {
  14. const CODE_GENERAL = 0;
  15. public function __construct($message, $code=self::CODE_GENERAL, $previous=null) {
  16. parent::__construct($message, $code, $previous);
  17. }
  18. public function __toString() {
  19. print $this->message;
  20. }
  21. }
  22. ?>