1 22 package javax.xml.registry; 23 24 28 public class JAXRException extends Exception 29 implements JAXRResponse 30 { 31 protected Throwable cause; 32 33 public JAXRException() 34 { 35 } 36 public JAXRException(String msg) 37 { 38 super(msg); 39 } 40 public JAXRException(String msg, Throwable cause) 41 { 42 super(msg, cause); 43 } 44 public JAXRException(Throwable cause) 45 { 46 super(cause); 47 } 48 public String getRequestId() 49 { 50 return null; 51 } 52 public int getStatus() 53 { 54 return 0; 55 } 56 public boolean isAvailable() throws JAXRException 57 { 58 return true; 59 } 60 61 72 public Throwable initCause(Throwable cause) 73 { 74 if( this.cause != null ) 75 { 76 if( this.cause == this ) 77 throw new IllegalArgumentException ("A throwable cannot be its own cause."); 78 else 79 throw new IllegalStateException ("cause has already been set"); 80 } 81 this.cause = cause; 82 super.initCause(cause); 83 return this; 84 } 85 } 86 | Popular Tags |