http://java.net/jira/browse/JAX_RS_SPEC-339
The WebApplicationException hierarchy has no constructors for setting
Exception.getMessage() value. This really sucks as I often find I want
a nice message that describes why the exception was thrown to be shown
in my console and/or server log file.
To get around this problem you have to do something like this:
throw new ForbiddenException(new Exception("The token didn't have valid
permission"));
I think this would be trivial to fix and important to solve to make
console and log files more readable.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com