adridadou / eth-contract-api

EthereumJ native API or how to call contracts easily and with type safety
http://www.davidroon.com/ethcontractapi/
Apache License 2.0
60 stars 34 forks source link

Create a small library for better exception handling #74

Closed adridadou closed 7 years ago

adridadou commented 7 years ago

The idea is the following: Create a simple smart contract / library you can include in your solidity code with the function throwException(string message)

The function will do the following:

On the java side, whenever a throw is detected, we will look if an event exists and if yes, we'll recreate a more verbose error message

kivanov82 commented 7 years ago

Nice idea, really missing it a lot at the moment. But there is no easy way to listen/search for the event at the moment, isn't it?

adridadou commented 7 years ago

You're right. This task has a dependency to the one talking about listening to events from EthereumJ / RPC. I've marked them as planned for 0.14. Hopefully I'll make it happen :)

adridadou commented 7 years ago

After a discussion on gitter, it seems that it isn't that easy. Events are also rolled back ... I'll need to find another way

adridadou commented 7 years ago

I'll close that for now. Having better error handling is needed for sure but I have no clear plan right now and the approach discussed here is not applicable