1234567891011121314151617181920212223242526272829 |
- package com.zhentao.common.exception;
- import com.zhentao.common.entity.IErrorCode;
- public class ApiException extends RuntimeException{
- private static final long serialVersionUID = -5885155226898287919L;
- private IErrorCode errorCode;
- public ApiException(IErrorCode errorCode) {
- super(errorCode.getMsg());
- this.errorCode = errorCode;
- }
- public ApiException(String message) {
- super(message);
- }
- public ApiException(Throwable cause) {
- super(cause);
- }
- public ApiException(String message, Throwable cause) {
- super(message, cause);
- }
- public IErrorCode getErrorCode() {
- return errorCode;
- }
- }
|