1

What could be done to get better error messages for problems that happen outside contract calls?

Inside contracts things are pretty easy, since one can define their own error messages. But if I call an EOA or a contract and the call fails before that, the error message is useless: it just says "execution reverted".

My specific pain point is about calling a contract function with Ethers that doesn't accept Ethers. But there are many similar problems that probably(?) cause the same or similar vague error.

Which part of the system should get fixed? The node client? The protocol? The calling wallet?

And how could we do this fix? This is a super annoying problem and not user friendly at all.

1 Answer 1

1

Hilariously bad error messages are recognised as one of the main points of bad developer and user experience in Solidity, for the last 10 years.

Two options

  • solc should generate bootstrap code with human readable Error messages like ("the entry point 0x3424234234 does not exist in this contract)
  • Fix all EVM client applications (Geth, Nethermind, OpenEthereum, etc.) to generate better error messages when the error message is not generated by the bytecode. There are some dozens of them today.

As a bonus

  • You would also need to have nested errors and rethrwo a la Java, Python, which I understand is currently unsupported - contracts do not properly bubble the underlying cause when calling other contracts that fail

The best way to fix this would be petition to someone to fund this as "developer experience improvement effort", like Ethereum Foundation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.