Exception: Dpl::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Dpl::Error
- Defined in:
- lib/dpl.rb
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
- #backtrace? ⇒ Boolean
-
#initialize(msg, opts = {}) ⇒ Error
constructor
A new instance of Error.
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
#opts ⇒ Object (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
19 20 21 |
# File 'lib/dpl.rb', line 19 def backtrace? !!opts[:backtrace] end |