use of org.springframework.beans.MethodInvocationException in project com.revolsys.open by revolsys.
the class ScriptExecutorRunnable method getBeanExceptionCause.
private static Throwable getBeanExceptionCause(final BeanCreationException e) {
Throwable cause = e.getCause();
while (cause instanceof BeanCreationException || cause instanceof MethodInvocationException || cause instanceof PropertyAccessException || cause instanceof PropertyBatchUpdateException || cause instanceof InvalidPropertyException) {
Throwable newCause;
if (cause instanceof PropertyBatchUpdateException) {
final PropertyBatchUpdateException batchEx = (PropertyBatchUpdateException) cause;
newCause = batchEx.getPropertyAccessExceptions()[0];
} else {
newCause = cause.getCause();
}
if (newCause != null) {
cause = newCause;
} else {
return cause;
}
}
return cause;
}
use of org.springframework.beans.MethodInvocationException in project com.revolsys.open by revolsys.
the class ScriptTool method getBeanExceptionCause.
private static Throwable getBeanExceptionCause(final BeanCreationException e) {
Throwable cause = e.getCause();
if (cause == null) {
return e;
}
while (cause instanceof BeanCreationException || cause instanceof MethodInvocationException || cause instanceof PropertyAccessException || cause instanceof PropertyBatchUpdateException || cause instanceof InvalidPropertyException) {
Throwable newCause;
if (cause instanceof PropertyBatchUpdateException) {
final PropertyBatchUpdateException batchEx = (PropertyBatchUpdateException) cause;
newCause = batchEx.getPropertyAccessExceptions()[0];
} else {
newCause = cause.getCause();
}
if (newCause != null) {
cause = newCause;
} else {
return cause;
}
}
return cause;
}
Aggregations