public class UncheckedException extends RuntimeException
| Modifier and Type | Field and Description |
|---|---|
protected String |
errcode
错误码
|
protected String |
errmsg
错误信息
|
| Modifier | Constructor and Description |
|---|---|
protected |
UncheckedException() |
protected |
UncheckedException(String message)
将抛出对象包裹成运行时异常,并增加自己的描述
|
protected |
UncheckedException(String format,
Object... args)
根据格式化字符串,生成运行时异常
|
protected |
UncheckedException(String errcode,
String errmsg)
将抛出对象包裹成运行时异常,并增加自己的描述
|
protected |
UncheckedException(String message,
Throwable cause)
将抛出对象包裹成运行时异常,并增加自己的描述
|
protected |
UncheckedException(Throwable cause)
将抛出对象包裹成运行时异常,并增加自己的描述
|
protected |
UncheckedException(Throwable e,
String fmt,
Object... args)
将抛出对象包裹成运行时异常,并增加自己的描述
|
| Modifier and Type | Method and Description |
|---|---|
protected static UncheckedException |
impossible()
生成一个不可能的运行时异常
|
protected static boolean |
isCauseBy(Throwable e,
Class<? extends Throwable> causeType) |
protected static UncheckedException |
noImplement()
生成一个未实现的运行时异常
|
protected static Throwable |
unwrapThrow(Throwable e) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprotected UncheckedException()
protected UncheckedException(String message)
message - 打印信息protected UncheckedException(Throwable cause)
cause - 抛出对象protected UncheckedException(String message, Throwable cause)
message - 打印信息cause - 抛出对象protected UncheckedException(String errcode, String errmsg)
errcode - 错误编码errmsg - 错误提示protected UncheckedException(String format, Object... args)
format - 格式args - 参数protected static UncheckedException noImplement()
protected static UncheckedException impossible()
Copyright © 2019. All rights reserved.