I'm using solidity compiler ^0.4.23, I added logs to the function at exception points like this:
function firstSaleDelivery(address _beneficiary, uint256 rate) public onlyOwner{
require(!presaleOpen && !firstsaleOpen, "First Sale is NOT CLOSE");
if(preSaleTokens >= 0){
saleTokens = saleTokens.add(preSaleTokens);
preSaleTokens = 0;
}
uint256 ethers = firstSaleFunds[_beneficiary];
uint256 tokens = ethers.mul(rate); // <u>
require(saleTokens >= tokens, "NO Sale Tokens Available");
if(ethers >= 5 && ethers <= 9 ){
tokens.add((tokens.mul(10)).div(100)); // <u>
}
else if(ethers >= 10 && ethers <= 200 ){
tokens.add((tokens.mul(25)).div(100)); // <u>
}
token.transfer(_beneficiary,tokens);
saleTokens = saleTokens.sub(tokens);
}
When I invoke the function, and if I face any exception, I can't see these Logs, where I can see them?
false
doesn't really say anything about why it failed..