BusinessException.java 404 B

1234567891011121314151617
  1. package space.anyi.petServiceManagementSystem.server.common;
  2. public class BusinessException extends RuntimeException {
  3. private int code;
  4. public BusinessException(int code, String message) {
  5. super(message);
  6. this.code = code;
  7. }
  8. public BusinessException(String message) {
  9. super(message);
  10. this.code = 400;
  11. }
  12. public int getCode() { return code; }
  13. }