# File lib/deltacloud/base_driver/exceptions.rb, line 149 def safely(&block) begin block.call rescue report_method = $stderr.respond_to?(:err) ? :err : :puts Deltacloud::ExceptionHandler::exceptions.each do |exdef| if exdef.match?($!) $stderr.send(report_method, "#{[$!.class.to_s, $!.message].join(':')}\n#{$!.backtrace.join("\n")}") new_exception = exdef.handler($!) raise exdef.handler($!) if new_exception end end $stderr.send(report_method, "[NO HANDLED] #{[$!.class.to_s, $!.message].join(': ')}\n#{$!.backtrace.join("\n")}") raise Deltacloud::ExceptionHandler::BackendError.new($!, "Unhandled exception or status code (#{$!.message})") end end
Generated with the Darkfish Rdoc Generator 2.