diff options
Diffstat (limited to 'lib/chef_zero/data_store/v2_to_v1_adapter.rb')
-rw-r--r-- | lib/chef_zero/data_store/v2_to_v1_adapter.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/chef_zero/data_store/v2_to_v1_adapter.rb b/lib/chef_zero/data_store/v2_to_v1_adapter.rb index f2cbce0..38f2bc1 100644 --- a/lib/chef_zero/data_store/v2_to_v1_adapter.rb +++ b/lib/chef_zero/data_store/v2_to_v1_adapter.rb @@ -90,13 +90,11 @@ module ChefZero protected def fix_exceptions - begin - yield - rescue DataAlreadyExistsError => e - raise DataAlreadyExistsError.new(e.path[2..-1], e) - rescue DataNotFoundError => e - raise DataNotFoundError.new(e.path[2..-1], e) - end + yield + rescue DataAlreadyExistsError => e + raise DataAlreadyExistsError.new(e.path[2..-1], e) + rescue DataNotFoundError => e + raise DataNotFoundError.new(e.path[2..-1], e) end def fix_path(path) |