1 25 26 package javax.ejb; 27 28 import java.io.PrintStream ; 29 import java.io.PrintWriter ; 30 31 36 public class EJBException extends RuntimeException { 37 38 41 private static final long serialVersionUID = 796770993296843510L; 42 43 44 47 private Exception causeException = null; 49 52 public EJBException() { 53 super(); 54 } 55 56 60 public EJBException(final Exception causedByException) { 61 super(causedByException); 62 this.causeException = causedByException; 63 } 64 65 69 public EJBException(final String message) { 70 super(message); 71 } 72 73 78 public EJBException(final String message, final Exception causedByException) { 79 super(message, causedByException); 80 this.causeException = causedByException; 81 } 82 83 86 public Exception getCausedByException() { 87 return causeException; 88 } 89 90 93 @Override 94 public String getMessage() { 95 return super.getMessage(); 96 } 97 98 101 @Override 102 public void printStackTrace() { 103 super.printStackTrace(); 104 } 105 106 110 @Override 111 public void printStackTrace(final PrintStream printStream) { 112 super.printStackTrace(printStream); 113 } 114 115 119 @Override 120 public void printStackTrace(final PrintWriter printWriter) { 121 super.printStackTrace(printWriter); 122 } 123 124 } 125 | Popular Tags |