Skip to content

Commit

Permalink
modified
Browse files Browse the repository at this point in the history
  • Loading branch information
yongjingchuan authored and yongjingchuan committed Aug 20, 2020
1 parent 2be0bec commit 5eabe84
Showing 1 changed file with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.cy.generate.common.exception;

import com.cy.generate.common.ErrorCode;

/**
* @Description:
* @Author: YongJingChuan
* @Date: 2020/8/20 16:20
*/
public class CommonException extends RuntimeException {

private ErrorCode errorCode;

public CommonException() {
}

public CommonException(String msg) {
super(msg);
}

public CommonException(Throwable throwable) {
super(throwable);
}

public CommonException(String msg, Throwable throwable) {
super(msg, throwable);
}

public CommonException(ErrorCode errorCode) {
super(errorCode.getMessage());
}

public CommonException(String msg, ErrorCode errorCode) {
super(msg);
this.errorCode = errorCode;
}

public CommonException(Throwable throwable, ErrorCode errorCode) {
super(throwable);
this.errorCode = errorCode;
}

public CommonException(String msg, Throwable throwable, ErrorCode errorCode) {
super(msg, throwable);
this.errorCode = errorCode;
}

public ErrorCode getErrorCode() {
return errorCode;
}

public void setErrorCode(ErrorCode errorCode) {
this.errorCode = errorCode;
}
}

0 comments on commit 5eabe84

Please sign in to comment.