DaanHoogland commented on code in PR #10132:
URL: https://github.com/apache/cloudstack/pull/10132#discussion_r1918766565
##########
engine/storage/volume/src/main/java/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java:
##########
@@ -1035,7 +1035,9 @@ private void
copyTemplateToManagedTemplateVolume(TemplateInfo srcTemplateInfo, T
try {
grantAccess(templateOnPrimary, destHost, destPrimaryDataStore);
} catch (Exception e) {
- throw new StorageAccessException("Unable to grant access to
template: " + templateOnPrimary.getId() + " on host: " + destHost.getId());
+ StorageAccessException e2 = new StorageAccessException("Unable
to grant access to template: " + templateOnPrimary.getId() + " on host: " +
destHost.getId());
+ e2.initCause(e);
+ throw e;
Review Comment:
how about adding the msg+cause contructor to StorageAccessException?
i.e. `StorageAccessException.StorageAccessException(String msg, Exception
cause)`
--
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]