You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by lu...@apache.org on 2012/09/25 01:33:24 UTC

[2/2] git commit: ExceptionHandler: initialize list of exceptions to empty array

ExceptionHandler: initialize list of exceptions to empty array

Drivers that do not have a exceptions do .. end block left the list as nil;
this leads to errors if these drivers then cause an exception within a
safely do .. end


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/972e6090
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/972e6090
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/972e6090

Branch: refs/heads/master
Commit: 972e6090fd5e20194fb07294e615922b79753c14
Parents: cb6117a
Author: David Lutterkort <lu...@redhat.com>
Authored: Mon Sep 24 16:29:51 2012 -0700
Committer: David Lutterkort <lu...@redhat.com>
Committed: Mon Sep 24 16:29:51 2012 -0700

----------------------------------------------------------------------
 server/lib/deltacloud/drivers/exceptions.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/972e6090/server/lib/deltacloud/drivers/exceptions.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/exceptions.rb b/server/lib/deltacloud/drivers/exceptions.rb
index 5e679a5..4b135bd 100644
--- a/server/lib/deltacloud/drivers/exceptions.rb
+++ b/server/lib/deltacloud/drivers/exceptions.rb
@@ -172,6 +172,7 @@ module Deltacloud
     end
 
     def self.exceptions(&block)
+      @definitions ||= []
       @definitions = Exceptions.new(&block).exception_definitions if block_given?
       @definitions
     end