Exception: Smartcard::PCSC::Exception
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Smartcard::PCSC::Exception
- Defined in:
- lib/smartcard/pcsc/exception.rb
Overview
Contains information about an exception at the PC/SC layer.
Instance Attribute Summary collapse
-
#pcsc_status ⇒ Object
readonly
Symbol for the PC/SC error status that caused this error.
-
#pcsc_status_code ⇒ Object
readonly
The PC/SC error status that caused this error, as a number.
Instance Method Summary collapse
-
#initialize(error_status) ⇒ Exception
constructor
A new instance of Exception.
Constructor Details
#initialize(error_status) ⇒ Exception
Returns a new instance of Exception.
3 4 5 6 7 8 |
# File 'lib/smartcard/pcsc/exception.rb', line 3 def initialize(error_status) @pcsc_status_code = 2**32 + error_status @pcsc_status = Smartcard::PCSC::FFILib::Status.find @pcsc_status_code super "#{@pcsc_status} (0x#{@pcsc_status_code.to_s(16)})" end |
Instance Attribute Details
#pcsc_status ⇒ Object (readonly)
Symbol for the PC/SC error status that caused this error.
11 12 13 |
# File 'lib/smartcard/pcsc/exception.rb', line 11 def pcsc_status @pcsc_status end |
#pcsc_status_code ⇒ Object (readonly)
The PC/SC error status that caused this error, as a number.
14 15 16 |
# File 'lib/smartcard/pcsc/exception.rb', line 14 def pcsc_status_code @pcsc_status_code end |