...by Daniel Szego
"On a long enough timeline we will all become Satoshi Nakamoto.."
Daniel Szego

Saturday, July 7, 2018

Fabric composer tips and tricks - logging in a transaction

Error handling in Hyperledger Fabric composer it a little bit tricky, especially if it is on runtime errors and you want to create complex business logic with complex transactions. What you can do however is to simply use the standard javascript console for logging events and errors:

  console.log('My event');  
  console.log('My error');  

At executing the transaction like in the Fabric composer playground, the error message will be logged in the console of your browser.