vakho

Java - 30

Jun 23rd, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. class Ex01 extends Exception {
  2.    
  3. }
  4.  
  5. class Ex02 extends Exception {
  6.    
  7. }
  8.  
  9. class Test {
  10.    
  11.     void throwEx01() throws Ex01 {
  12.         throw new Ex01();
  13.     }
  14.    
  15.     void throwEx02() throws Ex02 {
  16.         throw new Ex02();
  17.     }
  18.    
  19.     void invoke() throws Ex02 {
  20.         try {
  21.             throwEx01();
  22.         }
  23.         catch (Ex01 e) {
  24.             // Damushaveba...
  25.         }
  26.         throwEx02();
  27.     }
  28.    
  29.     public static void main(String[] args) {
  30.         try {
  31.             new Test().invoke();
  32.         }
  33.         catch (Ex02 e) {
  34.             // Damushaveba...
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment