Class: Fabric::ErrorFactory
- Inherits:
-
Object
- Object
- Fabric::ErrorFactory
- Defined in:
- lib/fabric/error.rb
Constant Summary collapse
- CHAINCODE_ERROR_MESSAGE_PREFIX =
'transaction returned with failure:'.freeze
Class Method Summary collapse
Class Method Details
.create(message) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/fabric/error.rb', line 5 def self.create() if .start_with? CHAINCODE_ERROR_MESSAGE_PREFIX ChaincodeError.new .gsub(CHAINCODE_ERROR_MESSAGE_PREFIX, '') else UnknownError.new end end |