incubator-libcloud mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Woods <woods...@gmail.com>
Subject Re: [libcloud] ideas on improving exceptions usage
Date Thu, 05 Aug 2010 18:51:36 GMT
+1.  I agree that this should be part of libcloud's base, rather than each driver bringing
their own exceptions.

On Aug 5, 2010, at 2:13 PM, Russell wrote:

> On Thu, Aug 5, 2010 at 10:57 AM, Paul Querna <paul@querna.org> wrote:
> 
>> I think we should try to include a little more meta-data in the base
>> exception class, like the driver.
>> 
>> Also in this specific example, I would like another specific
>> exception, LibcloudMalformedResponseException or such, because this is
>> one of the most common errors we see from various providers.  We also
>> will want another one for providers that return 500s or 400s to API
>> calls, maybe LibcloudHTTPException, probably would be nice to include
>> the response body / HTTP code in it.
>> 
>> Happy to hack on it a bit, but I think you could commit the patch you
>> have to trunk and we can iterate from there.
>> 
>> -Paul
>> 
> 
> +1 for this. I'd also like to see some differentiation between exceptions
> that can be safely retried (a read operation failed or a write operation
> failed without before the write occurred) and those that can't (a write
> operation that succeeded but returned a malformed response). This probably
> wouldn't be the easiest thing to do (other than distinguishing between GETs
> and POSTs) but would be great from a user perspective.
> 
> -Russell


Mime
View raw message