View Javadoc

1   package com.bradmcevoy.http.exceptions;
2   
3   import com.bradmcevoy.http.Resource;
4   
5   /**
6    *
7    * @author brad
8    */
9   public class BadRequestException extends MiltonException {
10      private static final long serialVersionUID = 1L;
11  
12      private final String reason;
13  
14      public BadRequestException(Resource r) {
15          super(r);
16          this.reason = null;
17      }
18  
19      public BadRequestException(Resource r, String reason) {
20          super(r);
21          this.reason = reason;
22      }
23  
24      /**
25       * Optional property, which describe the cause of the exception
26       * @return
27       */
28      public String getReason() {
29          return reason;
30      }
31  
32  
33  
34  }