IBM-Blockchain-Starter-Kit / chaincode-bootstrap

https://ibm-blockchain-starter-kit.github.io/
Apache License 2.0
3 stars 11 forks source link

print function name, not args, on error #26

Closed eymorale closed 6 years ago

eymorale commented 6 years ago

Signed-off-by: Edna Morales eymorale@us.ibm.com

eymorale commented 6 years ago

On an actual error, say I try to invoke 'Healthz' function instead of 'Health', this causes a go panic runtime error saying index out of range, since there are no args passed to this chaincode function and that's what is trying to be printed here. The function name is what needs to be printed since that is presumably the incorrect argument that the client has called out to.