Object response;
try {
response = this.getMethod().invoke(theResourceProvider, params);
} catch (IllegalAccessException e) {
throw new InternalErrorException(e);
} catch (IllegalArgumentException e) {
throw new InternalErrorException(e);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();
if (cause != null) {
if (cause instanceof BaseServerResponseException) {
throw (BaseServerResponseException)cause;
} else {
throw new InternalErrorException(cause);
}
}
throw new InternalErrorException(e);
}
return toResourceList(response);
}