lib/activeresource-response/connection.rb in activeresource-response-0.0.7 vs lib/activeresource-response/connection.rb in activeresource-response-0.0.8
- old
+ new
@@ -2,11 +2,16 @@
module Connection
def self.included(base)
base.class_eval do
alias_method :origin_handle_response, :handle_response
def handle_response(response)
+ begin
+ origin_handle_response(response)
+ rescue StandardError => e
+ raise e
+ end
+ response.extend(ActiveresourceResponse::HttpResponse)
Thread.current[:ActiveResourceHttpResponse] = response
- origin_handle_response(response)
end
def http_response
Thread.current[:ActiveResourceHttpResponse]
end
end
\ No newline at end of file