mirror of https://github.com/apache/cloudstack.git
bug 6690: if the exception is one that we are handling (reporting information about bad API parameters, for example) don't log the exception. If we aren't handling it, *then* we should log the exception.
status 6690: resolved fixed
This commit is contained in:
parent
388ec0b072
commit
51f2ce0e86
|
|
@ -224,12 +224,12 @@ public class ApiDispatcher {
|
|||
if (cause instanceof AsyncCommandQueued) {
|
||||
throw (AsyncCommandQueued)cause;
|
||||
}
|
||||
s_logger.warn("Exception executing method " + methodName + " for command " + cmd.getClass().getSimpleName(), ite);
|
||||
if (cause instanceof InvalidParameterValueException) {
|
||||
throw new ServerApiException(BaseCmd.PARAM_ERROR, cause.getMessage());
|
||||
} else if (cause instanceof PermissionDeniedException) {
|
||||
throw new ServerApiException(BaseCmd.ACCOUNT_ERROR, cause.getMessage());
|
||||
}
|
||||
s_logger.warn("Exception executing method " + methodName + " for command " + cmd.getClass().getSimpleName(), ite);
|
||||
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Unable to execute method " + methodName + " for command " + cmd.getClass().getSimpleName() + ", internal error in the implementation.");
|
||||
} catch (IllegalAccessException iae) {
|
||||
s_logger.warn("Exception executing method " + methodName + " for command " + cmd.getClass().getSimpleName(), iae);
|
||||
|
|
|
|||
Loading…
Reference in New Issue