1 18 19 package sync4j.syncclient.spdm; 20 21 import java.io.PrintStream ; 22 import java.io.PrintWriter ; 23 24 31 public class DMException extends Exception { 32 33 private Throwable cause = null; 34 35 38 public DMException() { 39 } 40 41 42 46 public DMException(final String msg) { 47 super(msg); 48 } 49 50 57 public DMException(final String msg, final Throwable cause) { 58 this(msg); 59 this.cause = cause; 60 } 61 62 67 public Throwable getCause() { 68 return cause; 69 } 70 71 74 public void printStackTrace() { 75 super.printStackTrace(); 76 if (cause != null) { 77 System.err.println("Caused by:"); 78 cause.printStackTrace(); 79 } 80 } 81 } | Popular Tags |