- cdi
- components
- contexts
- converters
- el
- eventlisteners
- exceptionhandlers
- facesviews
- filters
- functions
- managedbeans
- push
- resourcehandlers
- search
- servlets
- taghandlers
- utils
- validators
- viewhandlers
- - Ajax
- Beans
- BeansLocal
- Components
- Events
- Exceptions
- Faces
- FacesConfigXml
- FacesLocal
- JNDI
- JNDIObjectLocator
- Messages
- Servlets
- WebXml
- cdi
- components
- contexts
- converters
- el
- eventlisteners
- exceptionhandlers
- facesviews
- filters
- functions
- managedbeans
- push
- resourcehandlers
- search
- servlets
- taghandlers
- utils
- validators
- viewhandlers
- Ajax
- Beans
- BeansLocal
- Components
- Events
- Exceptions
- Faces
- FacesConfigXml
- FacesLocal
- JNDI
- JNDIObjectLocator
- Messages
- Servlets
- WebXml
Collection of general utility methods with respect to working with exceptions. So far there's only an unwrapper and a type checker.
Usage
Some examples:
// Check if the caught exception has a ConstraintViolationException in its hierarchy.
catch (PersistenceException e) {
if (Exceptions.is(e, ConstraintViolationException.class)) {
// ...
}
}
// Unwrap the caught FacesException until a non-FacesException is found.
catch (FacesException e) {
Exception realRootCause = Exceptions.unwrap(e, FacesException.class);
// ...
}
Feature request
If you know more useful methods/functions which you think should be added to this OmniFaces utility class so that everyone can benefit from a "standard" JSF utility library, feel free to post a feature request.
Documentation & Sources