This is my sample contract..
pragma solidity ^ 0.4.15;
contract Sample{
struct Info
{
address pubKey; //key
bytes32 Id;
}
mapping(address => Info) public userMap;
// Registration
function register(bytes32 orgId, address pubKey) public returns(bool){
if (pubKey == 0x0 || orgId == 0x0 ) {
revert("Pub Key & Org Id are mandatory");
}
if (userMap[pubKey].pubKey == pubKey) {
revert("User already exists");
}
userMap[pubKey].pubKey = pubKey;
userMap[pubKey].orgId = orgId;
return true;
}
//getting the given Details
function getUser(address pubKey) public returns(bytes32 orgId){
orgId = userMap[pubKey].orgId;
}
}
I have to handle the message returning from the revert() in the api (node.js). Whether will I get this message in the transactionReceipt of the corresponding transaction like web3.eth.getTransaction(txhash) or where can I read the above message?