Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. @ResponseStatus
  2. public class CustomErrorType extends RuntimeException{
  3.  
  4.     private HttpStatus status;
  5.     private String message;
  6.  
  7.     public CustomErrorType() {
  8.     }
  9.  
  10.     public CustomErrorType(HttpStatus status, String message) {
  11.         this.status = status;
  12.         this.message = message;
  13.     }
  14.  
  15.     public HttpStatus getCode() {
  16.         return status;
  17.     }
  18.  
  19.     public String getMessage() {
  20.         return message;
  21.     }
  22.  
  23.  
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement