Updated Branches: refs/heads/4.1 bc1fa4a4c -> 903aeb9b7
CloudStack-1371 : In case of ResourceAllocationException, server is not returnig any response. Signed-off-by: Mice Xia <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/903aeb9b Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/903aeb9b Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/903aeb9b Branch: refs/heads/4.1 Commit: 903aeb9b775561763810b7de708a7997a4685509 Parents: bc1fa4a Author: Sanjay Tripathi <[email protected]> Authored: Fri Feb 22 14:32:32 2013 +0530 Committer: Mice Xia <[email protected]> Committed: Mon Feb 25 13:38:07 2013 +0800 ---------------------------------------------------------------------- .../apache/cloudstack/api/ServerApiException.java | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/903aeb9b/api/src/org/apache/cloudstack/api/ServerApiException.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/ServerApiException.java b/api/src/org/apache/cloudstack/api/ServerApiException.java index 682e5b7..4b0fae5 100644 --- a/api/src/org/apache/cloudstack/api/ServerApiException.java +++ b/api/src/org/apache/cloudstack/api/ServerApiException.java @@ -43,7 +43,7 @@ public class ServerApiException extends CloudRuntimeException { super(description, cause); _errorCode = errorCode; _description = description; - if (cause instanceof CloudRuntimeException || cause instanceof CloudException ) { + if (cause instanceof CloudRuntimeException) { CloudRuntimeException rt = (CloudRuntimeException) cause; ArrayList<String> idList = rt.getIdProxyList(); if (idList != null) { @@ -52,6 +52,15 @@ public class ServerApiException extends CloudRuntimeException { } } setCSErrorCode(rt.getCSErrorCode()); + } else if (cause instanceof CloudException) { + CloudException rt = (CloudException) cause; + ArrayList<String> idList = rt.getIdProxyList(); + if (idList != null) { + for (int i = 0; i < idList.size(); i++) { + addProxyObject(idList.get(i)); + } + } + setCSErrorCode(rt.getCSErrorCode()); } }
