This is valid JAX-RS 2.0 exception handling correct?
try {
String result = webTarget.request().get(String.class);
} catch (NotFoundException ex) {
} catch (...) {}
All the WebAplicationException derivatives are thrown from all methods
that don't return Response, correct?
I'm looking at the Javadoc of AsyncInvoker:
* In case a processing of a properly received response fails, the
wrapped processing exception
* will be of {_at_link ResponseProcessingException} type and will
contain the {_at_link Response}
* instance whose processing has failed.
It doesn't seem like this is the same for async invocations, which I
think it wrong. Async invocations should also be similar to sync.
Future<String> future = webTarget.request().async().get(String.class);
try {
String result = future.get();
} catch (NotFoundException ex) {
} catch (...) {...}
It sounds like from the javadoc that everything is wrapped within a
ResponseProcessingException.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com