Some details about events

BorisBoris Posts: 1
Hi all, new to solidity and ethereum, I just started to deploy contracts and, in some smart contracts examples, I viewed the event concept for the first time and started to search more details about it. So, I understood, events are used to log informations you passed in. But where are those informations logged ?
For example, I made an event to log the errors resulting of a function :

event Sent(address indexed From, address indexed to, uint value);

function validateTransaction (address receiver, uint amount) constant returns (bool) {
if (balances[owner] < amount) {
transactFail("error: Insufficient balance");
return false;
}
else if (owner == receiver) {
transactFail("error: Receiver can't be the sender");
return false;
}
else if (amount == 0) {
transactFail("error: amount has to be greater than 0");
}
balances[owner] -= msg.value;
return true;
}

And I don't see any of these messages when an error occured. Am I doing it wrong ?

Answers

Sign In or Register to comment.