Jerome, regarding exceptions caught --


You've implemented this only for when users override methods in non-annotated mode. In annotated mode, exceptions are still not allowed. This leads to different ways of doing things if you're in annotated or non-annotated mode. Personally, I think that disallowing exceptions across the board would result in better user code.


If you decide that you do want to handle exceptions for annotated handlers, see doHandle(AnnotationInfo): you would need to get the reflected exception via InvocationTargetException.getTargetException().


Whatever you decide, I recommend that the same allowances be made for both annotated and non-annotated mode.


-Tal


Jerome Louvel wrote:

2) Exceptions caught
 
Currently (SVN trunk at least), the ResourceExceptions are caught and the response status is updated accordingly. This is done in the ServerResource#handle() method. Other exceptions will be caught upper in the processing chain, by the StatusService for example.
 
We do have some plans to extend the ConverterService in order to automatically convert common exceptions into matching statuses, but I'm not clear yet whether this is such a good idea (JAX-RS has this).

Reply via email to