java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.xml.crypto.MarshalException
- 所有已实现的接口:
-
Serializable
表示在XML编组或解组过程中发生的异常情况。
MarshalException 可能包含一个原因: 导致此 MarshalException 被抛出的另一个可抛出对象。
- 自从:
- 1.6
- 参见:
-
Constructor Summary
ConstructorsConstructorDescription使用null作为其详细消息构造一个新的MarshalException。MarshalException(String message) 使用指定的详细消息构造一个新的MarshalException。MarshalException(String message, Throwable cause) 使用指定的详细消息和原因构造一个新的MarshalException。MarshalException(Throwable cause) 使用指定的原因和详细消息(cause==null ? null : cause.toString())(通常包含cause的类和详细消息)构造一个新的MarshalException。 -
Method Summary
Modifier and TypeMethodDescriptiongetCause()返回此MarshalException的原因,如果原因不存在或未知,则返回null。void将此MarshalException、其回溯和原因的回溯打印到标准错误流。void将此MarshalException、其回溯和原因的回溯打印到指定的打印流。void将此MarshalException、其回溯和原因的回溯打印到指定的打印写入器。Methods declared in class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Constructor Details
-
MarshalException
public MarshalException()使用null作为其详细消息构造一个新的MarshalException。 -
MarshalException
使用指定的详细消息构造一个新的MarshalException。- 参数:
-
message- 详细消息
-
MarshalException
使用指定的详细消息和原因构造一个新的MarshalException。请注意,与
cause关联的详细消息不会自动并入此异常的详细消息。- 参数:
-
message- 详细消息 -
cause- 原因(允许值为null,表示原因不存在或未知。)
-
MarshalException
使用指定的原因和详细消息(cause==null ? null : cause.toString())(通常包含cause的类和详细消息)构造一个新的MarshalException。- 参数:
-
cause- 原因(允许值为null,表示原因不存在或未知。)
-
-
Method Details
-
getCause
返回此MarshalException的原因,如果原因不存在或未知,则返回null。(原因是导致此MarshalException被抛出的可抛出对象。) -
printStackTrace
public void printStackTrace()将此MarshalException、其回溯和原因的回溯打印到标准错误流。- 覆盖:
-
printStackTrace在类Throwable
-
printStackTrace
将此MarshalException、其回溯和原因的回溯打印到指定的打印流。- 覆盖:
-
printStackTrace在类Throwable - 参数:
-
s- 用于输出的PrintStream
-
printStackTrace
将此MarshalException、其回溯和原因的回溯打印到指定的打印写入器。- 覆盖:
-
printStackTrace在类Throwable - 参数:
-
s- 用于输出的PrintWriter
-