> @@ -16,7 +16,7 @@
> */
> package org.jclouds.softlayer.exceptions;
>
> -public class SoftLayerOrderItemDuplicateException extends RuntimeException {
> +public class SoftLayerOrderItemDuplicateException extends
> IllegalStateException {
Oh, I see now. Thanks @andreaturli. So the exception is propagated first where
I mentioned, but is catched afterward in the invocation proxy to make sure a
proper exception is propagated, to keep the exception model tiny and consistent.
The problem here is that there are [a few exceptions
considered](https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/util/Throwables2.java#L138-L141)
as the top-level exceptions jclouds propagates, but those are not flexible
enough for the custom to let the providers throw controlled exceptions
generated in the error handlers.
In my opinion it would be a good idea to create a new `ProviderException` (or
similar) in jclouds, that all providers willing to propagate custom controlled
exceptions could extend. This will help keeping the exception model in jclouds
small, allowing the error handlers to define a custom exception set.
This is quite a relevant change, so I think it is a good discussion have in the
mailing list.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/204/files#r7653115