
java.lang.Object
|---java.lang.Throwable
|---|---java.lang.Error
|---|---|---java.lang.VirtualMachineError
public abstract class VirtualMachineError
extends Error
抛出以指示 Java 虚拟机已损坏或已用完继续运行所需的资源。
| 构造函数 | 描述 |
|---|---|
| VirtualMachineError() | 构造一个没有详细消息的 VirtualMachineError。 |
| VirtualMachineError(String message) | 构造一个带有指定详细消息的 VirtualMachineError。 |
| VirtualMachineError(String message, Throwable cause) | 使用指定的详细消息和原因构造一个 VirtualMachineError。 |
| VirtualMachineError(Throwable cause) | 构造一个具有指定原因的 VirtualMachineError 和 (cause==null ? null : cause.toString()) 的详细消息(通常包含原因的类和详细消息)。 |
| 从类 java.lang.Object 继承的方法 |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 从类 java.lang.Throwable 继承的方法 |
|---|
| addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
public VirtualMachineError()
构造一个没有详细消息的 VirtualMachineError。
public VirtualMachineError(String message)
构造一个带有指定详细消息的 VirtualMachineError。
参数:
| 参数名称 | 参数描述 |
|---|---|
| message | 详细信息。 |
public VirtualMachineError(String message, Throwable cause)
使用指定的详细消息和原因构造一个 VirtualMachineError。
请注意,与原因相关的详细消息不会自动合并到此错误的详细消息中。
参数:
| 参数名称 | 参数描述 |
|---|---|
| message | 详细消息(保存以供 Throwable.getMessage() 方法稍后检索)。 |
| cause | 原因(由 Throwable.getCause() 方法保存以供以后检索)。 (允许使用空值,表示原因不存在或未知。) |
public VirtualMachineError(Throwable cause)
构造一个具有指定原因的 VirtualMachineError 和 (cause==null ? null : cause.toString()) 的详细消息(通常包含原因的类和详细消息)。
参数:
| 参数名称 | 参数描述 |
|---|---|
| cause | 原因(由 Throwable.getCause() 方法保存以供以后检索)。 (允许使用空值,表示原因不存在或未知。) |