Hi,
> There are several identicaly implementations of safely now, they should
> be lifted into BaseDriver.
That's true and makes sense for me. I moved this method into base driver.
Also I created a new method in base_driver named 'catched_exceptions_list'
which returns Hash of potentional exceptions from backend.
There are three keys in this hash:
{
:error => [] # -> Exception classes placed here will raise BackendError
:auth => [] # -> Exception classes placed here will raise AuthException
:glob => [] # -> To avoid a looong list of exceptions from backend, you can
define a regexp to handle multiple exceptions. (eg. [ /AWS::(\w+)/])
}
> Also, it would be better if safely took a list of classes and only
> turned exceptions of a subclass of one of the classes into
> BackendError's, so that we don't obscure the difference between a true
> internal server error (because of a problem in the Deltacloud code) vs.
> an error from the backend.
'Real' internal server errors are now handled in standard way (original
exception is 'reraised'.
rev2. of patch attached.
-- Michal