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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]