You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/05/13 04:38:01 UTC
[GitHub] [cloudstack] sureshanaparti commented on a diff in pull request #6387: Reword KVM VM snapshot without memory error message
sureshanaparti commented on code in PR #6387:
URL: https://github.com/apache/cloudstack/pull/6387#discussion_r871993549
##########
api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java:
##########
@@ -90,7 +91,13 @@ public Long getVmId() {
@Override
public void create() throws ResourceAllocationException {
- VMSnapshot vmsnapshot = _vmSnapshotService.allocVMSnapshot(getVmId(), getDisplayName(), getDescription(), snapshotMemory());
+ VMSnapshot vmsnapshot;
+ try {
+ vmsnapshot = _vmSnapshotService.allocVMSnapshot(getVmId(), getDisplayName(), getDescription(), snapshotMemory());
+ } catch (CloudRuntimeException e) {
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vm snapshot: " + e.getMessage(), e);
Review Comment:
```suggestion
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create VM snapshot: " + e.getMessage(), e);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org