You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2010/12/10 14:06:46 UTC
svn commit: r1044339 - /incubator/deltacloud/trunk/client/lib/deltacloud.rb
Author: mfojtik
Date: Fri Dec 10 13:06:45 2010
New Revision: 1044339
URL: http://svn.apache.org/viewvc?rev=1044339&view=rev
Log:
BackendError now inherits from StandardError instead of Exception
This allows the errors to be caught by 'naked' rescue blocks, and allows
the AASM gem's error handling mechanism to properly handle BackendErrors,
since it explicitly rescues StandardError.
Modified:
incubator/deltacloud/trunk/client/lib/deltacloud.rb
Modified: incubator/deltacloud/trunk/client/lib/deltacloud.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/client/lib/deltacloud.rb?rev=1044339&r1=1044338&r2=1044339&view=diff
==============================================================================
--- incubator/deltacloud/trunk/client/lib/deltacloud.rb (original)
+++ incubator/deltacloud/trunk/client/lib/deltacloud.rb Fri Dec 10 13:06:45 2010
@@ -309,7 +309,7 @@ module DeltaCloud
# Re-raise backend errors as on exception in client with message from
# backend
- class BackendError < Exception
+ class BackendError < StandardError
def initialize(opts={})
@message = opts[:message]
end