try {
int a =1/0;
}catch (Exception e) {
e.printStackTrace();
//手动抛出异常
throw new worldExcept(6000,"执行了自定义异常");
}
@Data
@AllArgsConstructor
@NoArgsConstructor
public class worldExcept extends RuntimeException {
@ApiModelProperty(value = "状态码")
private Integer code;
private String msg;
}



