Exception: Howler::Message::Error

Inherits:
Exception
  • Object
show all
Defined in:
lib/howler/exceptions/error.rb

Direct Known Subclasses

Failed, Notify, Retry

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Error

Returns a new instance of Error.



5
6
7
8
9
10
11
# File 'lib/howler/exceptions/error.rb', line 5

def initialize(options = {})
  @info = {}

  options.each do |key, value|
    @info[key.to_s] = value
  end
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/howler/exceptions/error.rb', line 3

def message
  @message
end

Instance Method Details

#infoObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/howler/exceptions/error.rb', line 13

def info
  @info.merge!(
    'backtrace' => self.backtrace[0..7]
  ) if self.backtrace && !@info['backtrace']

  @info.merge!(
    'message' => self.message
  ) unless @info['message']

  @info
end