Module: EventHub::Patches::CelluloidLoggerCrash

Defined in:
lib/eventhub/patches/celluloid_logger.rb

Instance Method Summary collapse

Instance Method Details

#crash(string, exception) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/eventhub/patches/celluloid_logger.rb', line 34

def crash(string, exception)
  message = +String(string)
  if Celluloid.log_actor_crashes
    message << "\n" << format_exception(exception)
    error message
  end

  @exception_handlers.each do |handler|
    handler.call(exception)
  rescue => ex
    error(+"EXCEPTION HANDLER CRASHED:\n" << format_exception(ex))
  end
end