1 21 22 package org.apache.derby.iapi.services.io; 23 24 import org.apache.derby.iapi.services.sanity.SanityManager; 25 26 import java.sql.SQLException ; 27 import java.io.IOException ; 28 29 32 class SQLExceptionWrapper extends SQLException 33 { 34 private Exception myException; 35 36 SQLExceptionWrapper(Exception e) 37 { 38 myException = e; 39 } 40 41 void handleMe() 42 throws IOException , ClassNotFoundException 43 { 44 if (myException instanceof IOException ) 45 { 46 throw ((IOException ) myException); 47 } 48 else if (myException instanceof ClassNotFoundException ) 49 { 50 throw ((ClassNotFoundException ) myException); 51 } 52 53 if (SanityManager.DEBUG) 54 { 55 SanityManager.NOTREACHED(); 56 } 57 } 58 59 void handleMeToo() 60 throws IOException 61 { 62 if (myException instanceof IOException ) 63 { 64 throw ((IOException ) myException); 65 } 66 67 if (SanityManager.DEBUG) 68 { 69 SanityManager.NOTREACHED(); 70 } 71 } 72 73 74 } 75 | Popular Tags |