1 22 package org.jboss.ejb3.test.bank; 23 24 29 public class BankException extends Exception  30 { 31 33 Exception cause; 35 36 38 public BankException(String message) 40 { 41 super(message); 42 } 43 44 public BankException(String message, Exception e) 45 { 46 super(message); 47 48 cause = e; 49 } 50 51 public Throwable getCause() 53 { 54 return cause; 55 } 56 57 public String toString() 58 { 59 return super.toString() + ", Cause:" + cause; 60 } 61 } 62 63 83 | Popular Tags |