On Wed, Sep 24, 2014 at 9:34 AM, Chris Mylonas <ch...@opencsta.org> wrote:
> >> In 5.4, you can contribute to the default error page and map exception >> types to specific error pages ( >> http://tapestry.apache.org/5.4/apidocs/org/apache/ >> tapestry5/internal/services/DefaultRequestExceptionHandler.html >> - that reminds me, I should add information about that to the user guide >> as >> well). >> > > And I've contributed all this in AppModule > public void > contributeDefaultRequestExceptionHandler(MappedConfiguration<Class, > Class> configuration) { > configuration.add(SliderException.class, DefaultNeeded.class); > } > > with a few attempts guessing the method name > contributeRequestExceptionHandler, > contributeExceptionHandler but each time a similar error in the logs: > Caused by: java.lang.IllegalArgumentException: Contribution > org.opencsta.website.metwide.web.services.AppModule. > contributeDefaultRequestExceptionHandler(MappedConfiguration) (at > AppModule.java:133) is for service 'DefaultRequestExceptionHandler', > which does not exist. > RequestExceptionHandler is the interface and the service name, so contributeRequestExceptionHandler works, I wonder which error message you got when you tried it. DefaultRequestExceptionHandler is the default exceptionHandler that accepts contributions. This configuration is already being used in tapestry-security 0.6, which is for T5.4 (see https://github.com/tynamo/tapestry-security/blob/master/src/main/java/org/tynamo/security/services/SecurityModule.java ). Kalle