java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.CloneNotSupportedException
java.rmi.server.ServerCloneException
public class ServerCloneException
如果在复制 UnicastRemoteObject 的过程中发生远程异常,则抛出 ServerCloneException。
从版本 1.4 开始,已对此异常作出改进,以符合通用异常链机制。可在构造时提供并通过公共 detail 字段访问的“嵌入的异常”现在称为 cause,该异常也能通过 Throwable.getCause() 方法以及前述的“遗留字段”访问。
在 ServerCloneException 的实例上调用方法 Throwable.initCause(Throwable) 始终抛出 IllegalStateException。
UnicastRemoteObject.clone(),
序列化表格
| 字段摘要 | |
|---|---|
Exception |
detail 异常原因。 |
| 构造方法摘要 | |
|---|---|
ServerCloneException(String s) 构造带指定详细消息的 ServerCloneException。 |
|
ServerCloneException(String s, Exception cause) 构造带指定详细消息和原因的 ServerCloneException。 |
|
| 方法摘要 | |
|---|---|
Throwable |
getCause() 返回此异常的原因。 |
String |
getMessage() 返回此异常的详细信息,包括原因的消息(如果有)。 |
| 从类 java.lang.Throwable 继承的方法 |
|---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 字段详细信息 |
|---|
public Exception detail
此字段早于通用异常链设施。Throwable.getCause() 方法现在是获取此信息的首选方法。
| 构造方法详细信息 |
|---|
public ServerCloneException(String s)
ServerCloneException。
s - 详细消息。
public ServerCloneException(String s, Exception cause)
ServerCloneException。
s - 详细消息。
cause - 原因
| 方法详细信息 |
|---|
public String getMessage()
Throwable 中的
getMessage
public Throwable getCause()