// We need to pass this along
throw ex;
}
catch (InvocationTargetException ex) {
// ppp("FAILED TO CREATE CLASS " + declaringClass);
throw new TestNGException("Cannot instantiate class " + declaringClass.getName(), ex);
// result = tryOtherConstructor(declaringClass);
}
catch (IllegalAccessException ex) {
result = tryOtherConstructor(declaringClass);
}
catch (NoSuchMethodException ex) {
result = tryOtherConstructor(declaringClass);
}
catch (InstantiationException ex) {
result = tryOtherConstructor(declaringClass);
}
catch (Throwable cause) {
// Something else went wrong when running the constructor
throw new TestNGException("An error occured while instantiating class " + declaringClass.getName(), cause);
}
return result;
}