From 1b52bebd08acf0dfba99f6d98287d5a15e1c3d0a Mon Sep 17 00:00:00 2001 From: Vishesh Date: Wed, 17 Apr 2024 17:27:08 +0530 Subject: [PATCH] Fix error message for checkVolume command (#409) --- .../src/main/java/com/cloud/storage/VolumeApiServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java index dfdf6adae37..840f1726379 100644 --- a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java +++ b/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java @@ -1878,7 +1878,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic } else if (jobResult instanceof ResourceAllocationException) { throw (ResourceAllocationException)jobResult; } else if (jobResult instanceof Throwable) { - throw new RuntimeException("Unexpected exception", (Throwable)jobResult); + Throwable throwable = (Throwable) jobResult; + throw new RuntimeException(String.format("Unexpected exception: %s", throwable.getMessage()), throwable); } }