Skip to content

Commit

Permalink
CloudStack-1371 : In case of ResourceAllocationException, server is n…
Browse files Browse the repository at this point in the history
…ot returnig any response.

Signed-off-by: Mice Xia <mice_xia@tcloudcomputing.com>
  • Loading branch information
sanjaytripathi authored and Mice Xia committed Feb 25, 2013
1 parent a32c6d5 commit a4398af
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion api/src/org/apache/cloudstack/api/ServerApiException.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public ServerApiException(ApiErrorCode errorCode, String description, Throwable
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) {
Expand All @@ -52,6 +52,15 @@ public ServerApiException(ApiErrorCode errorCode, String description, Throwable
}
}
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());
}
}

Expand Down

0 comments on commit a4398af

Please sign in to comment.