문제

I've implemented a custom exception handler for my Faces, but it's absorbing the errors generated when there is an issue with the actual XHTML. How can I filter these?

도움이 되었습니까?

해결책

You can check in you exception handler if the exception is type of FacesException That will give you the abillity to fitlter by exception type

Try this ...

Throwable rootCause = getRootCause(throwable);
if (FacesException.class.isAssignableFrom(rootCause.getClass()))
{
   // perform sepecfic logic 
   // maybe you dont want to handle this exception
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top