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.



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

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.



9
10
11
# File 'lib/dpl.rb', line 9

def opts
  @opts
end

Instance Method Details

#backtrace?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/dpl.rb', line 17

def backtrace?
  !!opts[:backtrace]
end