Skip to content

Commit 29e1bbc

Browse files
onitakeyadvr
authored andcommitted
server: rethrow takeVMSnapshot() exception instead of returning null (#3546)
Fixes NPE, and throws actual exception with the error stacktrace Fixes: #3518
1 parent 7a86ca7 commit 29e1bbc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ private VMSnapshot orchestrateCreateVMSnapshot(Long vmId, Long vmSnapshotId, Boo
515515
return snapshot;
516516
} catch (Exception e) {
517517
s_logger.debug("Failed to create vm snapshot: " + vmSnapshotId, e);
518-
return null;
518+
throw new CloudRuntimeException("Failed to create vm snapshot: " + vmSnapshotId, e);
519519
}
520520
}
521521

0 commit comments

Comments
 (0)