sureshanaparti commented on a change in pull request #5544:
URL: https://github.com/apache/cloudstack/pull/5544#discussion_r802519379



##########
File path: 
server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java
##########
@@ -308,11 +308,12 @@ public Snapshot revertSnapshot(Long snapshotId) {
             }
         }
 
-        DataStoreRole dataStoreRole = getDataStoreRole(snapshot, 
_snapshotStoreDao, dataStoreMgr);
+        DataStoreRole dataStoreRole = getDataStoreRole(snapshot);
 
         SnapshotInfo snapshotInfo = snapshotFactory.getSnapshot(snapshotId, 
dataStoreRole);
+
         if (snapshotInfo == null) {
-            throw new CloudRuntimeException("snapshot:" + snapshotId + " not 
exist in data store");
+            throw new CloudRuntimeException(String.format("snapshot [%s] does 
not exists in data store", snapshotId));

Review comment:
       ```suggestion
               throw new CloudRuntimeException(String.format("snapshot %s [%s] 
does not exists in data store", snapshot.getName(), snapshot.getUuid()));
   ```




-- 
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