1 18 package sync4j.syncclient.spap; 19 20 import java.io.PrintStream ; 21 import java.io.PrintWriter ; 22 23 28 public class ApplicationManagementException extends Exception { 29 Throwable cause; 30 31 public ApplicationManagementException(final String strMsg) { 32 super(strMsg); 33 } 34 35 public ApplicationManagementException(final String strMsg, final Throwable cause) { 36 super(strMsg); 37 38 this.cause = cause; 39 } 40 41 public ApplicationManagementException(final Throwable cause) { 42 this("", cause); 43 } 44 45 public Throwable getCause() { 46 return cause; 47 } 48 49 public void printStackTrace() { 50 super.printStackTrace(); 51 if (cause != null) { 52 System.err.println("Caused by:"); 53 cause.printStackTrace(); 54 } 55 } 56 57 public void printStackTrace(PrintStream ps) { 58 super.printStackTrace(ps); 59 if (cause != null) { 60 System.err.println("Caused by:"); 61 cause.printStackTrace(ps); 62 } 63 } 64 65 public void printStackTrace(PrintWriter pw) { 66 super.printStackTrace(pw); 67 if (cause != null) { 68 System.err.println("Caused by:"); 69 cause.printStackTrace(pw); 70 } 71 } 72 73 } | Popular Tags |