public class CustomException extends Exception
自定义异常基类
所有程序中自定义异常的基类Modifier and Type | Field and Description |
---|---|
protected int |
errorCode
错误码
|
Constructor and Description |
---|
CustomException() |
CustomException(int errorCode,
String message) |
CustomException(String message) |
CustomException(String message,
Throwable cause) |
CustomException(String message,
Throwable cause,
boolean enableSuppression,
boolean writableStackTrace) |
CustomException(Throwable cause) |
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode() |
void |
setErrorCode(int errorCode) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Copyright © 2021. All rights reserved.