SeecoderBuildException.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. package cn.seecoder.build.client;
  2. public class SeecoderBuildException extends RuntimeException {
  3. public static final SeecoderBuildException UNKNOWN_ERROR = new SeecoderBuildException("-1", "Unknown Error");
  4. public static final SeecoderBuildException JSON_ERROR = new SeecoderBuildException("101", "JSON Processing Error");
  5. public static final SeecoderBuildException IO_ERROR = new SeecoderBuildException("102", "Execute IO Error");
  6. public static final SeecoderBuildException UNAHTORIZATION_ERROR = new SeecoderBuildException("403", "Unauthorization Error");
  7. public static final SeecoderBuildException NOT_FOUND_ERROR = new SeecoderBuildException("404", "Not Found Error");
  8. public static final SeecoderBuildException INTERNAL_SERVER_ERROR = new SeecoderBuildException("500", "Internal Server Error");
  9. public static final String BIZ_ERROR_CODE = "100";
  10. private String code;
  11. private String msg;
  12. public SeecoderBuildException(String code, String msg) {
  13. super(msg);
  14. this.code = code;
  15. this.msg = msg;
  16. }
  17. public SeecoderBuildException(String code, String msg, Throwable cause) {
  18. super(msg, cause);
  19. this.code = code;
  20. this.msg = msg;
  21. }
  22. }