public SystemException getSystemException()

in wilma-application/modules/wilma-engine/src/main/java/com/epam/wilma/engine/bootstrap/helper/SystemExceptionSelector.java [38:52]


    public SystemException getSystemException(final Exception e) {
        SystemException result = null;
        if ((e instanceof BeanCreationException) && (((NestedRuntimeException) e).getMostSpecificCause() != null)) {
            Throwable ex = e;
            boolean found = false;
            while (ex.getCause() != null && !found) {
                if (ex.getCause() instanceof SystemException) {
                    found = true;
                    result = (SystemException) ex.getCause();
                }
                ex = ex.getCause();
            }
        }
        return result;
    }