[GitHub] rafaelweingartner commented on a change in pull request #3170: NotImplemented as a local exception

2019-02-11 Thread GitBox
rafaelweingartner commented on a change in pull request #3170: NotImplemented 
as a local exception
URL: https://github.com/apache/cloudstack/pull/3170#discussion_r255496880
 
 

 ##
 File path: 
plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuImg.java
 ##
 @@ -72,7 +71,7 @@ public static PreallocationType getPreallocationType(final 
Storage.ProvisioningT
 case FAT:
 return PreallocationType.Full;
 default:
-throw new NotImplementedException();
+throw new 
NotImplementedProvisioningTypeException(String.format("type {} not defined as 
member-value of PreallocationType", provisioningType));
 
 Review comment:
   Is this a new type of `String.format` use? I am missing a `%s` there.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rafaelweingartner commented on a change in pull request #3170: NotImplemented as a local exception

2019-02-11 Thread GitBox
rafaelweingartner commented on a change in pull request #3170: NotImplemented 
as a local exception
URL: https://github.com/apache/cloudstack/pull/3170#discussion_r255483128
 
 

 ##
 File path: 
plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuImg.java
 ##
 @@ -72,7 +70,7 @@ public static PreallocationType getPreallocationType(final 
Storage.ProvisioningT
 case FAT:
 return PreallocationType.Full;
 default:
-throw new NotImplementedException();
+throw new NotImplementedProvisioningTypeException();
 
 Review comment:
   It also works. I only think that we need to add something in the exception. 
I mean, a message saying what is not implemented (the preallocation type 
selected/sent by the user).


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rafaelweingartner commented on a change in pull request #3170: NotImplemented as a local exception

2019-02-08 Thread GitBox
rafaelweingartner commented on a change in pull request #3170: NotImplemented 
as a local exception
URL: https://github.com/apache/cloudstack/pull/3170#discussion_r255248770
 
 

 ##
 File path: 
plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuImg.java
 ##
 @@ -72,7 +70,7 @@ public static PreallocationType getPreallocationType(final 
Storage.ProvisioningT
 case FAT:
 return PreallocationType.Full;
 default:
-throw new NotImplementedException();
+throw new NotImplementedProvisioningTypeException();
 
 Review comment:
   What if instead, you throw a cloud runtime with a message describing the 
problem/error here?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services