From 133f286b0609b85eb7fd7807c3c92eb8ee74833f Mon Sep 17 00:00:00 2001 From: alena Date: Wed, 29 Dec 2010 09:50:14 -0800 Subject: [PATCH] Fixed description for ServerApiException --- server/src/com/cloud/api/ApiDispatcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/api/ApiDispatcher.java b/server/src/com/cloud/api/ApiDispatcher.java index 6e985b88b71..778c5602388 100644 --- a/server/src/com/cloud/api/ApiDispatcher.java +++ b/server/src/com/cloud/api/ApiDispatcher.java @@ -108,7 +108,7 @@ public class ApiDispatcher { s_logger.warn(t.getClass() + " : " + ((ServerApiException) t).getDescription()); errorMsg = ((ServerApiException) t).getDescription(); if (UserContext.current().getCaller().getType() == Account.ACCOUNT_TYPE_ADMIN) { - throw new ServerApiException(BaseCmd.INTERNAL_ERROR, t.getMessage()); + throw new ServerApiException(BaseCmd.INTERNAL_ERROR, errorMsg); } else { throw new ServerApiException(BaseCmd.INTERNAL_ERROR, BaseCmd.USER_ERROR_MESSAGE); } @@ -173,7 +173,7 @@ public class ApiDispatcher { errorMsg = ((ServerApiException) t).getDescription(); s_logger.warn(t.getClass() + " : " + ((ServerApiException) t).getDescription()); if (UserContext.current().getCaller().getType() == Account.ACCOUNT_TYPE_ADMIN) { - throw new ServerApiException(BaseCmd.INTERNAL_ERROR, t.getMessage()); + throw new ServerApiException(BaseCmd.INTERNAL_ERROR, errorMsg); } else { throw new ServerApiException(BaseCmd.INTERNAL_ERROR, BaseCmd.USER_ERROR_MESSAGE); }