List of usage examples for org.apache.commons.jxpath JXPathInvalidAccessException getCause
public Throwable getCause()
From source file:org.openvpms.component.business.service.archetype.ArchetypeServiceFunctionsTestCase.java
/** * Verifies that an exception matches that expected. * * @param exception the root exception//from w w w . ja v a 2 s .c o m * @param code the code of the expected exception */ private void checkException(JXPathInvalidAccessException exception, PropertyResolverException.ErrorCode code) { Throwable target = exception.getCause(); assertNotNull(target); assertTrue(target instanceof PropertyResolverException); PropertyResolverException cause = (PropertyResolverException) target; assertEquals(code, cause.getErrorCode()); }