Exception: NWRFC::NWError
- Inherits:
-
Exception
- Object
- Exception
- NWRFC::NWError
- Defined in:
- lib/nwrfc/nwerror.rb
Instance Attribute Summary collapse
-
#class ⇒ Object
readonly
Returns the value of attribute class.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(error) ⇒ NWError
constructor
Instantiate Error object with a handle to an FFI::MemoryPointer to an NWRFCLib::RFCError object.
- #inspect ⇒ Object
Constructor Details
#initialize(error) ⇒ NWError
Instantiate Error object with a handle to an FFI::MemoryPointer to an NWRFCLib::RFCError object. The error object is analyzed so that when the caller intercepts it with Rescue, all the error details are available
11 12 13 14 15 16 17 |
# File 'lib/nwrfc/nwerror.rb', line 11 def initialize(error) @code = NWRFCLib::RFC_RC[error[:code]] @group = NWRFCLib::RFC_ERROR_GROUP[error[:group]] @message = error[:message].get_str @type = error[:abapMsgType].get_str @number = error[:abapMsgNumber].get_str end |
Instance Attribute Details
#class ⇒ Object (readonly)
Returns the value of attribute class.
5 6 7 |
# File 'lib/nwrfc/nwerror.rb', line 5 def class @class end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/nwrfc/nwerror.rb', line 5 def code @code end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
5 6 7 |
# File 'lib/nwrfc/nwerror.rb', line 5 def group @group end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/nwrfc/nwerror.rb', line 5 def @message end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
5 6 7 |
# File 'lib/nwrfc/nwerror.rb', line 5 def number @number end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/nwrfc/nwerror.rb', line 5 def type @type end |
Instance Method Details
#inspect ⇒ Object
19 20 21 |
# File 'lib/nwrfc/nwerror.rb', line 19 def inspect "#{@message} (code #{@code}, group #{@group}, type #{@type}, number #{@number})" end |