Module: MeExceptional::BasicExtension
- Defined in:
- lib/me_exceptional/extension.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
37 38 39 |
# File 'lib/me_exceptional/extension.rb', line 37 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#exception_catcher(e) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/me_exceptional/extension.rb', line 6 def exception_catcher(e) = "#{e.class}: #{e.}" content = {:backtrace => e.backtrace.join("\n"), :timestamp => Time.zone.now} m = MeExceptional::Mailer.error_mail(, content) m.deliver Rails.logger.error "[EXCEPTION] #{e.class}: #{e.}" end |