1 7 8 package java.rmi; 9 10 32 public class RemoteException extends java.io.IOException { 33 34 35 private static final long serialVersionUID = -5148567311918794206L; 36 37 46 public Throwable detail; 47 48 51 public RemoteException() { 52 initCause(null); } 54 55 61 public RemoteException(String s) { 62 super(s); 63 initCause(null); } 65 66 74 public RemoteException(String s, Throwable cause) { 75 super(s); 76 initCause(null); detail = cause; 78 } 79 80 86 public String getMessage() { 87 if (detail == null) { 88 return super.getMessage(); 89 } else { 90 return super.getMessage() + "; nested exception is: \n\t" + 91 detail.toString(); 92 } 93 } 94 95 102 public Throwable getCause() { 103 return detail; 104 } 105 } 106 | Popular Tags |