server: rethrow takeVMSnapshot() exception instead of returning null (#3546)

Fixes NPE, and throws actual exception with the error stacktrace

Fixes: #3518
This commit is contained in:
Gregor Riepl 2019-12-07 23:19:54 +01:00 committed by Rohit Yadav
parent 7a86ca7fb5
commit 29e1bbc22d

View File

@ -515,7 +515,7 @@ public class VMSnapshotManagerImpl extends MutualExclusiveIdsManagerBase impleme
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);
}
}