public class MarshalException extends 异常
一个MarshalException可以包含一个原因:另一个可抛出的,导致这MarshalException被抛出。
| Constructor and Description |
|---|
MarshalException()
构造一个新的
MarshalException与
null作为其详细信息。
|
MarshalException(String message)
构造一个新的
MarshalException具有指定的详细信息。
|
MarshalException(String message, Throwable cause)
构造一个新的
MarshalException与指定的详细信息和原因。
|
MarshalException(Throwable cause)
构造一个新的
MarshalException与指定的原因和详细消息
(cause==null ? null : cause.toString()) (它通常包含的类和详细消息
cause )。
|
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getCause()
如果原因不存在或未知,则返回此
MarshalException或
null的原因。
|
void |
printStackTrace()
打印此
MarshalException ,其回溯和原因回溯到标准错误流。
|
void |
printStackTrace(PrintStream s)
打印此
MarshalException ,其回溯和原因回溯到指定的打印流。
|
void |
printStackTrace(PrintWriter s)
打印
MarshalException ,其回溯和原因的回溯到指定的打印作者。
|
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toStringpublic MarshalException()
MarshalException与
null作为其详细信息。
public MarshalException(String message)
MarshalException具有指定的详细信息。
message - 详细信息
public MarshalException(String message, Throwable cause)
MarshalException与指定的详细信息和原因。
请注意,与cause联的详细消息不会自动并入此异常的详细消息。
message - 详细信息
cause - 原因(
允许 A
null值,表示原因不存在或未知)。
public MarshalException(Throwable cause)
MarshalException与指定的原因和详细消息
(cause==null ? null : cause.toString()) (它通常包含的类和详细消息
cause )。
cause - 原因(
允许 A
null值,表示原因不存在或未知)。
public Throwable getCause()
MarshalException或null的原因。
(原因是引发这个MarshalException可抛出的)
public void printStackTrace()
MarshalException ,其回溯和原因回溯到标准错误流。
printStackTrace在
Throwable
public void printStackTrace(PrintStream s)
MarshalException ,其回溯和原因回溯到指定的打印流。
printStackTrace在类
Throwable
s -
PrintStream用于输出
public void printStackTrace(PrintWriter s)
MarshalException ,其回溯和原因回溯到指定的打印作者。
printStackTrace在
Throwable
s -
PrintWriter to use for output
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.