theborch / rackspace_lbaas

Libraries for managing Rackspace Cloud Load Balancers with Chef.
Apache License 2.0
0 stars 0 forks source link

Pass original exception #9

Open martinb3 opened 9 years ago

martinb3 commented 9 years ago

Instead of this https://github.com/theborch/rackspace_lbaas/blob/master/libraries/helpers.rb#L122-L124:

      rescue Fog::Rackspace::LoadBalancers::ServiceError => e
        raise "An error occured updating the load balancer (#{name}) : #{e}"
      end

You could also do something like:

    rescue
      raise
    end

That would be nice because you don't have to write as many error messages, and you'd pass the true reasons directly back to the user/chef run.