Example usage for org.apache.commons.jxpath JXPathInvalidAccessException getCause

List of usage examples for org.apache.commons.jxpath JXPathInvalidAccessException getCause

Introduction

In this page you can find the example usage for org.apache.commons.jxpath JXPathInvalidAccessException getCause.

Prototype

public Throwable getCause() 

Source Link

Document

Same as #getException() getException()

Usage

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());
}