As per my knowledge,there are no custom exceptions in solidity. The only exception is
Out of Gas. Wherever we write
throw in contract code, it throws
But, is there any way I can catch that exception? I mean if I can execute a piece of code whenever an exception occurs? Even on working with geth console, I didn't get any notification that whether any exception occurred.
I think it's pretty possible to catch such exception, because Mist is able to display
Intrinsic gas too low error message, whenever an exception occurred, so it must have handled that exception somewhere.
Basically the question is:
How can we know, before sending the transaction, that this transaction will consume all the provided gas?
I am not asking on How can I provide sufficient gas for my transaction but How can I know that my transaction will run out of gas.
One way of doing so is to send the transaction, let it be mined and then check for
gasUsed=gasSend, of if there is
But I want to know whether my transaction will go through or not without sending the transaction. In Mist whenever I try to send a transaction that will encounter a
throw statement, It displays
Intrinsic gas too low before sending the transaction. I want to do the same from