Advertisement
Guest User

Untitled

a guest
Sep 20th, 2011
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1.     class ExtendsException extends Exception { }
  2.  
  3.     class ThrowNewException {
  4.         public function tryExeption() {
  5.         try {
  6.            try {
  7.                throw new ExtendsException('catch!');
  8.            } catch (ExtendsException $catch) {
  9.          throw $catch;
  10.          }
  11.         } catch (Exception $throwNewException) {
  12.        var_dump($throwNewException->getMessage());
  13.       }
  14.      }
  15.     }
  16.  
  17.     $throwNewException = new ThrowNewException;
  18.     $throwNewException->tryException();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement