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)
构建指定详细信息的一个jaxbexception,供应商特定的错误代码,并linkedexception。
|
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和堆栈跟踪(包括对linkedexception堆栈跟踪,如果它是非空)来
System.err。
|
void |
printStackTrace(PrintStream s)
打印该jaxbexception和堆栈跟踪(包括对linkedexception堆栈跟踪,如果它是非空)的可。
|
void |
printStackTrace(PrintWriter s)
打印该jaxbexception和堆栈跟踪(包括对linkedexception堆栈跟踪,如果它是非空)到PrintWriter。
|
void |
setLinkedException(Throwable exception)
添加一个链接的异常。
|
String |
toString()
返回本jaxbexception简短的描述。
|
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace
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 String getErrorCode()
public Throwable getLinkedException()
public void setLinkedException(Throwable exception)
exception
-链接的例外(null值是允许的,表明链接的异常不存在或未知)。
public String toString()
public void printStackTrace(PrintStream s)
printStackTrace
方法重写,继承类
Throwable
s
-可用于输出
public void printStackTrace()
printStackTrace
方法重写,继承类
Throwable
public void printStackTrace(PrintWriter s)
printStackTrace
方法重写,继承类
Throwable
s
- PrintWriter使用输出
public Throwable getCause()
Throwable
null
原因如果原因是不存在的或未知的。(原因是引起这个异常被抛出,
此实现返回的原因是通过一个需要Throwable
建设者提供,或是与Throwable.initCause(Throwable)
方法创建后。虽然它通常不需要重写此方法,但子类可以重写它以通过其他方式返回一个原因集。这是适合“遗产锁抛出“在连锁Throwable
添加例外。请注意,它凌驾于任何的PrintStackTrace
方法是不必要,所有这些调用getCause
方法来确定一个Throwable的原因。
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.