CloudStack-1371 : In case of ResourceAllocationException, server is not returnig any response.

Signed-off-by: Mice Xia <mice_xia@tcloudcomputing.com>
This commit is contained in:
Sanjay Tripathi 2013-02-22 14:32:32 +05:30 committed by Mice Xia
parent a32c6d5c9d
commit a4398af353

View File

@ -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());
}
}