| 1 | <?php |
||
| 7 | class MyException extends Exception |
||
| 8 | { |
||
| 9 | // Redefine the exception so message isn't optional |
||
| 10 | public function __construct($message, $code = 0, Exception $previous = null) { |
||
| 16 | |||
| 17 | // custom string representation of object |
||
| 18 | public function __toString() { |
||
| 21 | |||
| 22 | public function customFunction() { |
||
| 25 | } |
||
| 26 | } |