Advertisement
Isigar

ExceptionHandler

Apr 21st, 2015
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <?php
  2. class ExceptionHandler extends Exception
  3. {
  4. public function __construct($message, $code = 0, Exception $previous = null) {
  5.  
  6. parent::__construct($message, $code, $previous);
  7. }
  8.  
  9. public function __toString() {
  10. return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
  11. }
  12.  
  13. public function customFunction() {
  14. echo "A custom function for this type of exception\n";
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement