Exception: Dpl::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/dpl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, opts = {}) ⇒ Error

Returns a new instance of Error.



13
14
15
16
17
# File 'lib/dpl.rb', line 13

def initialize(msg, opts = {})
  super(msg)
  @opts = opts
  set_backtrace(opts[:backtrace]) if backtrace?
end

Instance Attribute Details

#optsObject (readonly)

Returns the value of attribute opts.



11
12
13
# File 'lib/dpl.rb', line 11

def opts
  @opts
end

Instance Method Details

#backtrace?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/dpl.rb', line 19

def backtrace?
  !!opts[:backtrace]
end