rackspace/ruby-cloudfiles — Issue #68: Exception Inheritance
Author: rbroemeling
Created: 2012-02-08 20:49:53+00:00
State: open

Hi,

I'm currently using ruby-cloudfiles, and one persistent issue that I run into is that while the CloudFiles exceptions are now properly namespaced (CloudFiles::Exceptions::*), they have no common ancestor other than StandardError, which makes it difficult to catch all CloudFiles::Exceptions::* without *also* catching all other instances of StandardError.

What I would like it see is a class hierarchy like this:

```
StandardError
- CloudFiles::Exception < StandardError
- Syntax < CloudFiles::Exception
- Connection < CloudFiles::Exception
- Authentication < CloudFiles::Exception
- InvalidResponse < CloudFiles::Exception
... etc.
```

In this way, it would be trivial to catch any CloudFiles::Exception; while leaving all other sub-classes of StandardError alone.

Thanks,

Remi