You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/08/06 07:30:02 UTC

[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #5282: Fix regression on create volume from snapshot

DaanHoogland commented on a change in pull request #5282:
URL: https://github.com/apache/cloudstack/pull/5282#discussion_r684012655



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -898,7 +898,9 @@ public VolumeVO createVolume(CreateVolumeCmd cmd) {
             created = false;
             VolumeInfo vol = volFactory.getVolume(cmd.getEntityId());
             vol.stateTransit(Volume.Event.DestroyRequested);
-            throw new CloudRuntimeException("Failed to create volume: " + volume.getId(), e);
+            String message = String.format("Failed to create volume [%s] due to [%s].", volume.getId(), e.getMessage());
+            s_logger.error(message, e);
+            throw new CloudRuntimeException(message, e);

Review comment:
       why log *and* throw? we can do with either.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org