Method: OneApm::Agent::Instrumentation::Sinatra#dispatch_and_notice_errors_with_oneapm

Defined in:
lib/one_apm/inst/framework/sinatra.rb

#dispatch_and_notice_errors_with_oneapmObject



159
160
161
162
163
164
165
166
# File 'lib/one_apm/inst/framework/sinatra.rb', line 159

def dispatch_and_notice_errors_with_oneapm
  dispatch_without_oneapm
ensure
  # Will only see an error raised if :show_exceptions is true, but
  # will always see them in the env hash if they occur
  had_error = env.has_key?('sinatra.error')
  OneApm::Manager.notice_error(env['sinatra.error']) if had_error
end