From 851101470718fa734d448fb57ce3b812c22bc626 Mon Sep 17 00:00:00 2001 From: Vishesh Date: Wed, 17 Apr 2024 17:27:27 +0530 Subject: [PATCH] Fix error message for checkVolume command (#8842) --- .../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 8679221107d8..02add0db174e 100644 --- a/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java +++ b/server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java @@ -1895,7 +1895,8 @@ private Pair handleCheckAndRepairVolumeJob(Long vmId, Long volum } 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); } }