Skip to content

Commit

Permalink
feat: add default code
Browse files Browse the repository at this point in the history
  • Loading branch information
llnancy committed Oct 15, 2024
1 parent f27ab4c commit 788c8dc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.llnancy.mojian.base.exception;

import io.github.llnancy.mojian.base.entity.response.Response;
import io.github.llnancy.mojian.base.enums.ResponseEnum;
import lombok.Getter;

import java.io.Serial;
Expand All @@ -20,7 +21,7 @@ public class MoJianBaseBizException extends RuntimeException {
/**
* 异常码
*/
private Integer code;
private Integer code = ResponseEnum.FAILURE.getCode();

/**
* use String.format()
Expand Down

0 comments on commit 788c8dc

Please sign in to comment.