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.