bug 6733: re-throw ServerApiExceptions when dispatching API commands rather than logging them and throwing a generic INTERNAL_ERROR exception

status 6733: resolved fixed
This commit is contained in:
Kris McQueen 2010-10-26 16:54:31 -07:00
parent 90f10cded7
commit 95da86ef1a
1 changed files with 2 additions and 0 deletions

View File

@ -231,6 +231,8 @@ public class ApiDispatcher {
throw new ServerApiException(BaseCmd.PARAM_ERROR, cause.getMessage());
} else if (cause instanceof PermissionDeniedException) {
throw new ServerApiException(BaseCmd.ACCOUNT_ERROR, cause.getMessage());
} else if (cause instanceof ServerApiException) {
throw (ServerApiException)cause;
}
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.");