lib/airbrake/sender.rb in airbrake-3.1.4 vs lib/airbrake/sender.rb in airbrake-3.1.5
- old
+ new
@@ -29,12 +29,12 @@
end
end
# Sends the notice data off to Airbrake for processing.
#
- # @param [Notice] notice The notice to be sent off
+ # @param [Notice or String] notice The notice to be sent off
def send_to_airbrake(notice)
- data = notice.to_xml
+ data = notice.respond_to?(:to_xml) ? notice.to_xml : notice
http = setup_http_connection
response = begin
http.post(url.path, data, HEADERS)
rescue *HTTP_ERRORS => e