1 7 8 package java.rmi.server; 9 10 30 public class ServerCloneException extends CloneNotSupportedException { 31 32 41 public Exception detail; 42 43 44 private static final long serialVersionUID = 6617456357664815945L; 45 46 52 public ServerCloneException(String s) { 53 super(s); 54 initCause(null); } 56 57 64 public ServerCloneException(String s, Exception cause) { 65 super(s); 66 initCause(null); detail = cause; 68 } 69 70 76 public String getMessage() { 77 if (detail == null) 78 return super.getMessage(); 79 else 80 return super.getMessage() + 81 "; nested exception is: \n\t" + 82 detail.toString(); 83 } 84 85 92 public Throwable getCause() { 93 return detail; 94 } 95 } 96 | Popular Tags |