| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
javax.xml.bind.JAXBException
public class JAXBException
这是所有 JAXB 异常的根异常类。
JAXBContext, 
Marshaller, 
Unmarshaller, 
序列化表格| 构造方法摘要 | |
|---|---|
| JAXBException(String message)构造带指定详细消息的 JAXBException。 | |
| JAXBException(String message,
              String errorCode)构造带指定详细消息和特定于供应商的 errorCode 的 JAXBException。 | |
| JAXBException(String message,
              String errorCode,
              Throwable exception)构造带指定的详细消息、特定于供应商的 errorCode 和 linkedException 的 JAXBException。 | |
| JAXBException(String message,
              Throwable exception)构造带指定的详细消息和 linkedException 的 JAXBException。 | |
| JAXBException(Throwable exception)构造带有一个 linkedException 的 JAXBException。 | |
| 方法摘要 | |
|---|---|
|  Throwable | getCause()返回此 throwable 的 cause;如果 cause 不存在或未知,则返回 null。 | 
|  String | getErrorCode()获取特定于供应商的错误代码。 | 
|  Throwable | getLinkedException()获取链接的异常。 | 
|  void | printStackTrace()打印此 JAXBException 及其对 System.err 的堆栈跟踪(如果为非 null,则包括 linkedException 的堆栈跟踪)。 | 
|  void | printStackTrace(PrintStream s)打印此 JAXBException 及其对 PrintStream 的堆栈跟踪(如果为非 null,则包括该 linkedException 的堆栈跟踪)。 | 
|  void | printStackTrace(PrintWriter s)打印此 JAXBException 及其对 PrintWriter 的堆栈跟踪(如果为非 null,则包括该 linkedException 的堆栈跟踪)。 | 
|  void | setLinkedException(Throwable exception)添加链接的异常。 | 
|  String | toString()返回此 JAXBException 的简短描述。 | 
| 从类 java.lang.Throwable 继承的方法 | 
|---|
| fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| 构造方法详细信息 | 
|---|
public JAXBException(String message)
message - 对异常的描述
public JAXBException(String message,
                     String errorCode)
message - 对异常的描述errorCode - 指定特定于供应商的错误代码的字符串public JAXBException(Throwable exception)
exception - 链接的异常
public JAXBException(String message,
                     Throwable exception)
message - 对异常的描述exception - 链接的异常
public JAXBException(String message,
                     String errorCode,
                     Throwable exception)
message - 对异常的描述errorCode - 指定特定于供应商的错误代码的字符串exception - 链接的异常| 方法详细信息 | 
|---|
public String getErrorCode()
public Throwable getLinkedException()
public void setLinkedException(Throwable exception)
exception - 链接的异常(允许使用 null 值,该值指示链接的异常不存在或者是未知的)。public String toString()
Throwable 中的 toStringpublic void printStackTrace(PrintStream s)
Throwable 中的 printStackTraces - 用于输出的 PrintStreampublic void printStackTrace()
Throwable 中的 printStackTracepublic void printStackTrace(PrintWriter s)
Throwable 中的 printStackTraces - 用于输出的 PrintWriterpublic Throwable getCause()
Throwable 复制的描述null。(该 Cause 是导致抛出此 throwable 的throwable。)
此实现返回由一个需要 Throwable 的构造方法提供的 cause,或者在创建之后通过 Throwable.initCause(Throwable) 方法进行设置的 cause。虽然通常不需要重写此方法,但子类可以重写它,以返回一个通过某些其他方式设置的 cause。这适用于在异常链(异常嵌套)机制被加入到 Throwable 之前存在“遗留 Throwable 链机制”的情况。注意,不必 重写任何 PrintStackTrace 方法,所有方法都调用 getCause 方法来确定 throwable 的 cause。
Throwable 中的 getCausenull。| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。