UndeclaredThrowableException e = (UndeclaredThrowableException)ex;
if (e.getUndeclaredThrowable() instanceof CertificateValidationException) {
throw VcException.LOGIN_ERROR(e.getUndeclaredThrowable());
}
} else if (ex instanceof InternalException) {
InternalException e = (InternalException)ex;
if (e.getCause() instanceof CertificateValidationException) {
throw VcException.LOGIN_ERROR(e.getCause());
}
}
throw VcException.LOGIN_ERROR(ex);
}
}