DaanHoogland commented on a change in pull request #5428:
URL: https://github.com/apache/cloudstack/pull/5428#discussion_r711794272



##########
File path: 
api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
##########
@@ -263,8 +264,13 @@ public long getEntityOwnerId() {
     @Override
     public void execute() throws ResourceUnavailableException, 
InsufficientCapacityException, ServerApiException {
         CallContext.current().setEventDetails("Vm Id: " + 
this._uuidMgr.getUuid(VirtualMachine.class, getId()));
-        UserVm result = _userVmService.updateVirtualMachine(this);
-        if (result != null){
+        UserVm result = null;
+        try {
+            result = _userVmService.updateVirtualMachine(this);
+        } catch (CloudRuntimeException e) {
+            throw new CloudRuntimeException(String.format("Failed to update 
VM, due to: %s", e.getLocalizedMessage()));

Review comment:
       ```suggestion
               throw new CloudRuntimeException(String.format("Failed to update 
VM, due to: %s", e.getLocalizedMessage()), 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to