Module: AppygramRails

Defined in:
lib/appygram-rails.rb,
lib/appygram-rails/catcher.rb,
lib/appygram-rails/version.rb

Defined Under Namespace

Classes: Catcher, Railtie

Constant Summary collapse

VERSION =
'1.0.6'
@@ignored_classes =
[
  'ActiveRecord::RecordNotFound',
  'ActionController::RoutingError'
]

Class Method Summary collapse

Class Method Details

.ignore_exception_class_name!(k) ⇒ Object



26
27
28
# File 'lib/appygram-rails.rb', line 26

def ignore_exception_class_name!(k)
  @@ignored_classes << k
end

.ignores_exception_class?(exception) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
33
34
35
36
37
# File 'lib/appygram-rails.rb', line 30

def ignores_exception_class?(exception)
  @@ignored_classes.each do |k|
    if exception.class.name == k
      return true
    end
  end
  false
end

.report_all_exceptions!Object



22
23
24
# File 'lib/appygram-rails.rb', line 22

def report_all_exceptions!
  @@ignored_classes = []
end