1 23 24 25 26 31 32 package com.sun.jdo.spi.persistence.support.ejb.ejbqlc; 33 34 39 public class EJBQLException 40 extends RuntimeException 41 { 42 43 Throwable cause; 44 45 48 public EJBQLException() 49 { 50 } 51 52 57 public EJBQLException(String msg) 58 { 59 super(msg); 60 } 61 62 68 public EJBQLException(String msg, Throwable cause) 69 { 70 super(msg); 71 this.cause = cause; 72 } 73 74 80 public Throwable getCause() 81 { 82 return cause; 83 } 84 85 92 public String toString() { 93 StringBuffer sb = new StringBuffer (); 95 sb.append (super.toString()); 96 if (cause != null) { 98 sb.append("\n"); sb.append("Nested exception"); sb.append("\n"); sb.append(cause.toString()); 102 } 103 return sb.toString(); 104 } 105 } 106 | Popular Tags |