Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
JSF - ExceptionMapper #395
I would like to see in Omnifaces (or maybe in JSF spec) a cleaner way to convert an exception to a FacesMessage. Today I have to handle exceptions manually and convert them to FacesMessage like this:
The problem with this aproach is that I need to handle the exception manually and convert it to FacesMessage all over the place, leading to a lot of boilerplate code.
I really would like to see something similar to JAX-RS ExceptionMapper  in Omnifaces/JSF. Pseudo-code example:
I know I could achieve almost the same result with a JSF Exception Handler, but I can only register one Exception Handler per application, and I want to use Omnifaces FullAjaxExceptionHandler (which in my opinion should be standardized in JSF by the way, but that is another discussion :)).
What do you guys think?
Untill this is implemented, you can easily do this with interceptors... I use this all the time.