jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] can't log console message on thrown exceptions

From: Bill Burke <bburke_at_redhat.com>
Date: Thu, 21 Feb 2013 09:16:28 -0500

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