Exception: Fabric::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Fabric::Error
- Defined in:
- lib/fabric/error.rb
Direct Known Subclasses
ChaincodeError, NetworkOfflineError, OrdererError, TransactionError, UnknownError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(message, code = 0, errors = {}) ⇒ Error
constructor
A new instance of Error.
- #response ⇒ Object
Constructor Details
#initialize(message, code = 0, errors = {}) ⇒ Error
Returns a new instance of Error.
17 18 19 20 21 22 |
# File 'lib/fabric/error.rb', line 17 def initialize(, code = 0, errors = {}) super @code = code @errors = errors end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
15 16 17 |
# File 'lib/fabric/error.rb', line 15 def code @code end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
15 16 17 |
# File 'lib/fabric/error.rb', line 15 def errors @errors end |
Instance Method Details
#response ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/fabric/error.rb', line 24 def response Hashie::Mash.new success: false, code: code, result: {}, message: , errors: errors end |