Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. public class MyUncheckedBusinessException extends RuntimeException {
  2.  
  3. private static final long serialVersionUID = -8460356990632230204L;
  4.  
  5. private final ErrorCode code;
  6.  
  7. public MyUncheckedBusinessException(ErrorCode code) {
  8. super();
  9. this.code = code;
  10. }
  11.  
  12. public MyUncheckedBusinessException(String message, Throwable cause, ErrorCode code) {
  13. super(message, cause);
  14. this.code = code;
  15. }
  16.  
  17. public MyUncheckedBusinessException(String message, ErrorCode code) {
  18. super(message);
  19. this.code = code;
  20. }
  21.  
  22. public MyUncheckedBusinessException(Throwable cause, ErrorCode code) {
  23. super(cause);
  24. this.code = code;
  25. }
  26.  
  27. public ErrorCode getCode() {
  28. return this.code;
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement