From 5513d4985b89680ee03b716848fda4be74b33543 Mon Sep 17 00:00:00 2001 From: Gregor Riepl Date: Wed, 7 Aug 2019 15:19:21 +0200 Subject: [PATCH] Rethrow takeVMSnapshot() exception instead of returning null in VMSnapshotManagerImpl Fixes: #3518 --- .../main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java b/server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java index e2cae0651ebb..86357f7700fc 100644 --- a/server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java +++ b/server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java @@ -515,7 +515,7 @@ private VMSnapshot orchestrateCreateVMSnapshot(Long vmId, Long vmSnapshotId, Boo return snapshot; } catch (Exception e) { s_logger.debug("Failed to create vm snapshot: " + vmSnapshotId, e); - return null; + throw new CloudRuntimeException("Failed to create vm snapshot: " + vmSnapshotId, e); } }