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.
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
#opts ⇒ Object (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
17 18 19 |
# File 'lib/dpl.rb', line 17 def backtrace? !!opts[:backtrace] end |