bug 9080: createVolume - return error for the failure to the user

status 9080: resolved fixed
This commit is contained in:
alena 2011-03-22 09:35:29 -07:00
parent 5a5bdc485c
commit 2956733760
1 changed files with 2 additions and 2 deletions

View File

@ -158,9 +158,9 @@ public class CreateVolumeCmd extends BaseCmd {
} catch (Exception ex) {
s_logger.error("Failed to create volume " + (useSnapshot ? ("from snapshot " + snapshotId) : ("in zone " + zoneId + " with disk offering " + diskOfferingId)), ex);
if (useSnapshot) {
throw new ServerApiException(BaseCmd.CREATE_VOLUME_FROM_SNAPSHOT_ERROR, "Unable to create a volume from snapshot with id " + snapshotId + " for this account.");
throw new ServerApiException(BaseCmd.CREATE_VOLUME_FROM_SNAPSHOT_ERROR, "Unable to create a volume from snapshot with id " + snapshotId + " for this account: " + ex.getMessage());
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to create volume in zone " + zoneId + " with disk offering " + diskOfferingId);
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to create volume in zone " + zoneId + " with disk offering " + diskOfferingId + ": " + ex.getMessage());
}
}