Hi Bruno,

I looked into the org.restlet.Router. I think the method attachDefault(Restlet) does exact what you want for the Router, right? I could also implement this for the JaxRsRouter. This is very easy to implement and analogue to Router.

best regards
  Stephan

Jerome Louvel schrieb:
Hi Bruno,

Sounds good to me. I would just suggest naming the method
"createExceptionHandler()". Stephan, any opinion on this change?

Otherwise, this should only go into SVN trunk as we can't modify the Restlet
API in the 1.1 branch. I hope that this won't be too big a burden in your
case.

Best regards,
Jérôme Louvel

-----Message d'origine-----
De : Bruno Dumon [mailto:[EMAIL PROTECTED] Envoyé : vendredi 7 novembre 2008 11:58
À : [email protected]
Objet : Re: Router: 'not matched' versus 'not found'

On Fri, 2008-11-07 at 10:06 +0100, Stephan Koops wrote:
Hi Bruno,

I planned a possibility of JAX-RS for this, but I had no time to implement it.
I will put it higher in my priority list.
Cool.

I have just tried if I can do everything I need by some customization
(via subclassing). It works and it is a clean solution.

The only change I need in JaxRsRestlet is the ability to provide a
custom ExceptionHandler. I can then override the methods like
rootResourceNotFound() and set a flag in a response attribute.

I've attached a patch for this small change. I've added a method which
can be overridden using subclassing, just to avoid adding a public
method, but I'm fine with either approach. Do you think this is an
acceptable change?

Reply via email to