title: How to include a message in a BadRequestException?
body: <p>Is it possible to include a message in a <code>BadRequestException</code> so when the user sees a response code a 400, he/she can also figure out why?</p>
  
  <p>The scenario would be something like this, simplified:</p>
  
  <pre><code>public Entity getEntityWithOptions(@PathParam("id") String id, @QueryParam("option") String optValue) {
      if (optValue != null) {
          // Option is an enum
          try {
              Option option = Option.valueOf(optValue);
          } catch (IllegalArgumentException e) {
              throw new BadRequestException(e.getMessage());
          }
          return new Entity(option);
      }
      return new Entity();
  }
  </code></pre>
  
  <p>I know this can be done returning a <code>Response</code> object instead, but I wouldn't want that.</p>
  
  <p>Is this possible? Maybe with an <code>ExceptionMapper&lt;BadRequestException&gt;</code>? Or this cannot be done since <code>BadRequestException</code> is already a Jersey-specific exception?</p>