模块 java.rmi

类 ServerCloneException

所有已实现的接口:
Serializable

public class ServerCloneException extends CloneNotSupportedException
如果在克隆 UnicastRemoteObject 期间发生远程异常,则会抛出 ServerCloneException

从 1.4 版开始,此异常已被改进以符合通用异常链接机制。可以在构造时提供并通过公共 detail 字段访问的“嵌套异常”现在称为原因,并且可以通过 Throwable.getCause() 方法以及前面提到的“遗留字段”进行访问。

ServerCloneException 的实例上调用方法 Throwable.initCause(Throwable) 总是抛出 IllegalStateException

自从:
1.1
参见:
  • 字段详细信息

    • detail

      public Exception  detail
      异常的原因。

      该字段早于通用异常链接工具。 Throwable.getCause() 方法现在是获取此信息的首选方法。

  • 构造方法详细信息

    • ServerCloneException

      public ServerCloneException(String  s)
      用指定的详细信息构造一个 ServerCloneException
      参数:
      s - 详细消息。
    • ServerCloneException

      public ServerCloneException(String  s, Exception  cause)
      使用指定的详细消息和原因构造一个 ServerCloneException
      参数:
      s - 详细消息。
      cause - 原因
  • 方法详情

    • getMessage

      public String  getMessage()
      返回详细消息,包括来自此异常原因的消息(如果有)。
      重写:
      getMessage 在类 Throwable
      返回:
      详细信息
    • getCause

      public Throwable  getCause()
      返回此异常的原因。此方法返回 detail 字段的值。
      重写:
      getCause 在类 Throwable
      返回:
      原因,可能是 null
      自从:
      1.4