public class RemoteException extends IOException
RemoteException
是一些通信相关的异常,可能对远程方法调用的执行过程中出现的共同的父类。远程接口的每个方法的一个延伸,
java.rmi.Remote
接口,必须列出
RemoteException
在throws子句。
在1.4版本中,该异常已被更新以符合通用异常链机制。“用远程例外”可能在施工时间提供,通过公共detail
领域现在被称为原因访问,并可以通过Throwable.getCause()
方法访问,以及前述的“传统领域。”
调用方法Throwable.initCause(Throwable)
对RemoteException
实例总是IllegalStateException
。
Constructor and Description |
---|
RemoteException()
构建了一个
RemoteException 。
|
RemoteException(String s)
创建一个指定详细信息的
RemoteException 。
|
RemoteException(String s, Throwable cause)
创建一个指定详细信息和原因
RemoteException 。
|
Modifier and Type | Method and Description |
---|---|
Throwable |
getCause()
返回此异常的原因。
|
String |
getMessage()
返回详细信息,包括此异常的原因的消息,如果有的话。
|
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public Throwable detail
这场早于通用异常链设施。现在的Throwable.getCause()
方法获取这一信息的首选方式。
public RemoteException()
RemoteException
。
public RemoteException(String s)
RemoteException
。
s
-详细信息
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.