Exception: Rnp::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Rnp::Error
- Defined in:
- lib/rnp/error.rb
Direct Known Subclasses
BadFormatError, BadPasswordError, FeatureNotAvailableError, InvalidSignatureError, NoSuitableKeyError
Instance Attribute Summary collapse
-
#rc ⇒ Object
readonly
Returns the value of attribute rc.
Instance Method Summary collapse
-
#initialize(msg, rc = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(msg, rc = nil) ⇒ Error
Returns a new instance of Error.
11 12 13 14 15 16 17 18 |
# File 'lib/rnp/error.rb', line 11 def initialize(msg, rc = nil) @rc = rc if rc desc = LibRnp.rnp_result_to_string(rc) msg = "#{msg} - (rc: 0x#{rc.to_s(16)}): #{desc}" end super(msg) end |
Instance Attribute Details
#rc ⇒ Object (readonly)
Returns the value of attribute rc.
9 10 11 |
# File 'lib/rnp/error.rb', line 9 def rc @rc end |