lib/new_relic/agent/agent.rb in newrelic_rpm-3.3.2.beta1 vs lib/new_relic/agent/agent.rb in newrelic_rpm-3.3.2.beta2
- old
+ new
@@ -127,13 +127,13 @@
if is_error
if options['exception']
e = options['exception']
elsif options['error_message']
- e = Exception.new options['error_message']
+ e = StandardError.new options['error_message']
else
- e = Exception.new 'Unknown Error'
+ e = StandardError.new 'Unknown Error'
end
error_collector.notice_error e, :uri => options['uri'], :metric => metric
end
# busy time ?
end
@@ -536,11 +536,11 @@
retry
rescue NewRelic::Agent::ForceDisconnectException => e
handle_force_disconnect(e)
rescue NewRelic::Agent::ServerConnectionException => e
handle_server_connection_problem(e)
- rescue Exception => e
+ rescue => e
handle_other_error(e)
end
# This is the method that is run in a new thread in order to
# background the harvesting and sending of data during the
@@ -1279,10 +1279,10 @@
harvest_and_send_timeslice_data
else
log.debug "Serializing agent data to disk"
NewRelic::Agent.save_data
end
- rescue Exception => e
+ rescue => e
NewRelic::Control.instance.disable_serialization = true
NewRelic::Control.instance.log.warn("Disabling serialization: #{e.message}")
retry_count ||= 0
retry_count += 1
retry unless retry_count > 1