Exception: Locomotive::Common::DefaultException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/locomotive/common/exception.rb

Direct Known Subclasses

RendererException

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, parent_exception = nil) ⇒ DefaultException

Returns a new instance of DefaultException.



8
9
10
11
12
13
# File 'lib/locomotive/common/exception.rb', line 8

def initialize(message = nil, parent_exception = nil)
  self.notifier = Locomotive::Common.configuration.notifier
  log_backtrace(parent_exception) if parent_exception
  super(message)
  init_plugins
end

Instance Attribute Details

#notifierObject

Returns the value of attribute notifier.



6
7
8
# File 'lib/locomotive/common/exception.rb', line 6

def notifier
  @notifier
end

Instance Method Details

#init_pluginsObject



15
16
17
18
19
20
21
# File 'lib/locomotive/common/exception.rb', line 15

def init_plugins
  @plugins = []
  ::Plugins.constants.each do |name|
    @plugins << ::Plugins.const_get(name).new(self)
  end
rescue NameError
end