I would like to be able to log a result of a condition:
if(time > 5) {
emit Result("time is larger than 5");
} else {
emit Result("time is less than 5");
}
This will work just fine, but when using a require
statement:
require(time > 5);
emit Result("time is larger than 5");
I can only log the event in case the require
succeeds.
In case the require
appears in a modifier:
modifier OnlyLargerThan5() {
require(time > 5);
emit Result("time is larger than 5");
_;
}
Is there a way to log both cases (Larger > 5 > Less) other then the if..else
statements?