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/07/26 10:51:50 UTC

[GitHub] [cloudstack] shwstppr commented on a change in pull request #5225: Fix of shrinking volumes with QCOW2 format

shwstppr commented on a change in pull request #5225:
URL: https://github.com/apache/cloudstack/pull/5225#discussion_r676497258



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1323,7 +1315,7 @@ private VolumeVO orchestrateResizeVolume(long volumeId, long currentSize, long n
             return volume;
 
         } catch (Exception e) {
-            throw new CloudRuntimeException("Exception caught during resize volume operation of volume UUID: " + volume.getUuid(), e);
+            throw new CloudRuntimeException(String.format("Failed to resize volume operation of volume UUID: [%s] due to - %s", volume.getUuid(), e));

Review comment:
       @slavkap I think @nvazquez meant you keep `e.getMessage()` there but also pass exception object as second param of the `CloudRuntimeException` as it has `CloudRuntimeException(String message, Throwable th)`
   ```suggestion
               throw new CloudRuntimeException(String.format("Failed to resize volume operation of volume UUID: [%s] due to - %s", volume.getUuid(), e.getMessage()), e);
   ```




-- 
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