1 24 25 package org.enhydra.dods.exceptions; 26 27 import java.io.*; 28 29 34 public class DodsBaseException extends Exception { 35 private Throwable cause; 36 37 42 public DodsBaseException(String msg) { 43 super(msg); 44 cause = null; 45 } 46 47 54 public DodsBaseException(String msg, 55 Throwable cause) { 56 super(msg); 57 this.cause = cause; 58 } 59 60 67 public DodsBaseException(Throwable cause) { 68 super(DodsBaseExceptionUtil.makeMessage(cause)); 69 this.cause = cause; 70 } 71 72 76 public String getMessage() { 77 return DodsBaseExceptionUtil.getMessage(this, super.getMessage()); 78 } 79 80 84 public Throwable getCause() { 85 return cause; 86 } 87 88 92 public void printStackTrace() { 93 super.printStackTrace(); 94 DodsBaseExceptionUtil.printCauseTrace(this); 95 } 96 97 101 public void printStackTrace(PrintStream s) { 102 super.printStackTrace(s); 103 DodsBaseExceptionUtil.printCauseTrace(this, s); 104 } 105 106 110 public void printStackTrace(PrintWriter s) { 111 super.printStackTrace(s); 112 DodsBaseExceptionUtil.printCauseTrace(this, s); 113 } 114 115 116 117 118 } 119 | Popular Tags |