lib/airbrake.rb in airbrake-3.0.4 vs lib/airbrake.rb in airbrake-3.0.5
- old
+ new
@@ -135,14 +135,11 @@
end
end
def build_notice_for(exception, opts = {})
exception = unwrap_exception(exception)
- if exception.respond_to?(:to_hash)
- opts = opts.merge(exception.to_hash)
- else
- opts = opts.merge(:exception => exception)
- end
+ opts = opts.merge(:exception => exception)
+ opts = opts.merge(exception.to_hash) if exception.respond_to?(:to_hash)
Notice.new(configuration.merge(opts))
end
def unwrap_exception(exception)
if exception.respond_to?(:original_exception)