public class JAXBException extends 异常
JAXBContext , Marshaller , Unmarshaller , Serialized Form 
       | Constructor and Description | 
|---|
| JAXBException(String message)
              构造具有指定详细消息的JAXBException。 
             | 
| JAXBException(String message, String errorCode)
              构造具有指定的详细消息和供应商特定的错误代码的JAXBException。 
             | 
| JAXBException(String message, String errorCode, Throwable exception)
              构造具有指定的详细消息,供应商特定的错误代码和linkedException的JAXBException。 
             | 
| JAXBException(String message, Throwable exception)
              构造具有指定的详细消息和linkedException的JAXBException。 
             | 
| JAXBException(Throwable exception)
              使用linkedException构造一个JAXBException。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| Throwable | getCause()
              如果原因不存在或未知,则返回此可抛出的原因或 
              null。 | 
| String | getErrorCode()
              获取供应商特定的错误代码 
             | 
| Throwable | getLinkedException()
              获取链接的异常 
             | 
| void | printStackTrace()
              将此JAXBException及其堆栈跟踪(包括链接异常的堆栈跟踪(如果非空)) 
             打印到 
             System.err 。 
             | 
| void | printStackTrace(PrintStream s)
              打印此JAXBException及其堆栈跟踪(包括链接异常的堆栈跟踪(如果非空))到PrintStream。 
             | 
| void | printStackTrace(PrintWriter s)
              打印此JAXBException及其堆栈跟踪(包括链接异常的堆栈跟踪(如果非空))到PrintWriter。 
             | 
| void | setLinkedException(Throwable exception)
              添加链接异常。 
             | 
| String | toString()
              返回此JAXBException的简短描述。 
             | 
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTracepublic 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 String getErrorCode()
public Throwable getLinkedException()
public void setLinkedException(Throwable exception)
exception - 链接的异常(允许空值,表示链接的异常不存在或未知)。 
           public String toString()
public void printStackTrace(PrintStream s)
printStackTrace在 
            Throwable类 
           s - 用于输出的PrintStream 
           public void printStackTrace()
printStackTrace在 
            Throwable 
           public void printStackTrace(PrintWriter s)
printStackTrace在类 
            Throwable 
           s - PrintWriter用于输出 
           public Throwable getCause()
Throwable 
          null 。 
           (原因是引发这个可抛掷物的抛掷物) 
            此实现返回通过需要Throwable的Throwable函数之一提供的Throwable ,或者使用Throwable.initCause(Throwable)方法创建后设置的原因 。 虽然通常不必重写此方法,但是子类可以覆盖它以返回通过其他方法设置的原因。 这是适合,早在加入链接例外的一个“遗留Throwable链机制” Throwable 。 请注意, 没有必要覆盖任何PrintStackTrace方法,所有这些方法都调用getCause方法来确定可抛出的原因。 
 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.