Skip to content

Instantly share code, notes, and snippets.

@godfat
Created March 17, 2011 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save godfat/874061 to your computer and use it in GitHub Desktop.
Save godfat/874061 to your computer and use it in GitHub Desktop.
# monkey patch eventmachine to ignore errors and report them,
# instead of crashing!!
module EventMachine
class << self
alias_method :crashing_stop, :stop
end
def self.stop
if @wrapped_exception
Scaler.report_error(@wrapped_exception)
@wrapped_exception = nil
else
crashing_stop
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment