New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non Ajax Request Exception not handled by FacesExceptionFilter - since it never reaches it - MyFaces #413

Closed
vijpan opened this Issue Nov 8, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@vijpan

vijpan commented Nov 8, 2017

Env: Liberty App Server 17.0.0.2 (JEE 7 compliant - MyFaces JSF 2.2 implementation), Primefaces 6.1, Omnifaces 2.6.5, Java 8
Alias: PrimeFaces - PF

I understand that with issue #395, FullAjaxExceptionHandler also handles non ajax request, but i don't see FacesExceptionFilter will be able to handle the exception since the Exception's are not getting propagated out of the render response phase (LifeCycle), for e.g. such as ELException happening during render response for initial request will trigger the exception to be swallowed (by first publishing it and then doing nothing about it) and will never be thrown out (at least in MyFaces), until someone creates its own exception factory and handler and simply throw the exception from 'shouldHandleExceptionRootCause' if it was non-ajax request from the handler.

This is what it's going in the MyFaces LifeCycle (rendering part)
try{
//do rendering related processing - and then some exception happens - e.g. ELException
}catch(Throwable ex){
//publish exception
}finally{
//exception handler - handles the exception
//since its non ajax request - FullAjaxExceptionHandler simply returns - after executing //shouldHandleExceptionRootCause
}

In the above scenario, it seems like non ajax request are simply swallowed, and FacesExceptionFilter never gets the chance to act on it.

May be i am missing something.

What do you think?
Thanks

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Nov 8, 2017

Member

Looks like this is a MyFaces specific quirk. Mojarra behaves as expected.

Member

BalusC commented Nov 8, 2017

Looks like this is a MyFaces specific quirk. Mojarra behaves as expected.

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Nov 10, 2017

Member

This will be with next 2.6.6-SNAPSHOT. Thank you for reporting.

Member

BalusC commented Nov 10, 2017

This will be with next 2.6.6-SNAPSHOT. Thank you for reporting.

@vijpan

This comment has been minimized.

Show comment
Hide comment
@vijpan

vijpan commented Nov 10, 2017

Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment