Package tech.xmagic.exception
Class AbstractException
java.lang.Object
java.lang.Throwable
java.lang.Exception
tech.xmagic.exception.AbstractException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ApiException,ApiLocalException,ApiNativeException,ApiRemoteException,ApiRpcException,ApiTimeoutException,CustomException,DataBaseException,DataException,FailureException,ForbiddenException,Http1xxException,Http2xxException,Http3xxException,Http4xxException,Http5xxException,MqException,MqTimeOutException,NotifyException,NotifyTimeOutException,SqlException,SysDeCodeException,SysDeCryptException,SysEnCodeException,SysEnCryptException,SysException,SysNotSupportException,SysParseException,SysSignException,SysVerifyException,SysWrapException,UnauthorizedException,UnKnownException,ValidationException
统一异常基类(包含异常类,业务失败类,验证类等)
基于普通异常
错误分为两级提示
msg:异常的提示信息
err:异常详细信息
message: [{code}]{msg} - err
- Since:
- 1.0.1
- Version:
- 1.0.1
- Author:
- xmagic
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractException(int code, String msg) 完整的异常(无错误详情,无标签)AbstractException(int code, String msg, String err) 完整的异常(无标签)AbstractException(int code, String msg, String err, String tag) 完整的异常AbstractException(ResultCode resultCode) 完整的异常(无错误详情,无标签)AbstractException(ResultCode resultCode, String err) 完整的异常(无标签)AbstractException(ResultCode resultCode, String err, String tag) 完整的异常 -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AbstractException
完整的异常- Parameters:
code- 错误代码msg- 错误提示err- 错误详情tag- 标签
-
AbstractException
完整的异常(无标签)- Parameters:
code- 错误代码msg- 错误提示err- 错误详情
-
AbstractException
完整的异常(无错误详情,无标签)- Parameters:
code- 错误代码msg- 错误提示
-
AbstractException
完整的异常- Parameters:
resultCode- 错误枚举err- 错误详情tag- 标签
-
AbstractException
完整的异常(无标签)- Parameters:
resultCode- 错误枚举err- 错误详情
-
AbstractException
完整的异常(无错误详情,无标签)- Parameters:
resultCode- 错误枚举
-
-
Method Details
-
getCode
public int getCode() -
getMsg
-
getErr
-
getTag
-