自定义异常

@Data
@AllArgsConstructor
@NoArgsConstructor
public class MySelfException extends RuntimeException {
     

    @ApiModelProperty(value = "状态码")
    private Integer code;

    private String msg;
    
}

你可能感兴趣的:(异常处理,java)