Class: GlobalErrorHandler::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/global_error_handler/handler.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(env, exception) ⇒ Handler

Returns a new instance of Handler.



3
4
5
6
7
8
# File 'lib/global_error_handler/handler.rb', line 3

def initialize(env, exception)
  @env = env
  @exception = exception
  @controller = @env['action_controller.instance']
  @parsed_error = nil
end

Instance Method Details

#process_exception!Object



10
11
12
13
14
15
# File 'lib/global_error_handler/handler.rb', line 10

def process_exception!
  return if @env['global_error_handler.proceed_time']
  @env['global_error_handler.proceed_time'] = Time.current.utc
  parse_exception
  store_exception
end