From 29567337601008fea725d0b384d036d627ec4af7 Mon Sep 17 00:00:00 2001 From: alena Date: Tue, 22 Mar 2011 09:35:29 -0700 Subject: [PATCH] bug 9080: createVolume - return error for the failure to the user status 9080: resolved fixed --- server/src/com/cloud/api/commands/CreateVolumeCmd.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/api/commands/CreateVolumeCmd.java b/server/src/com/cloud/api/commands/CreateVolumeCmd.java index e88a4c3f6e9..9f5393046de 100644 --- a/server/src/com/cloud/api/commands/CreateVolumeCmd.java +++ b/server/src/com/cloud/api/commands/CreateVolumeCmd.java @@ -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()); } }