Is there any way to catch solidity revert message like Remix Javascript VM in web3j (Java)
Revert message(Remix)
transact to Erecruitment.issueNewAdmitCard errored: VM error: revert.
revert The transaction has been reverted to the initial state.
Reason provided by the contract: "Admit card ID already exists in Blockchain". Debug the transaction to get more information.
Event message (Remix)
logs [
{
"from": "0x692a70d2e424a56d2c6c27aa97d1a86395877b3a",
"topic": "0xbf970614f4ff9483c34fa1a053bc6614e06003a1faef2d0876e9255bfa3167fc",
"event": "LogIssueNewCard",
"args": {
"0": "2",
"1": "4",
"2": "New Card is issued in Blockchain",
"admitCardId": "2",
"applicantName": "4",
"message": "New Card is issued in Blockchain",
"length": 3
}
}
]
I get event messages for successful transactions in web3j. So, I can be sure that whether my transaction is completed without any error. If transaction is reverted there will be no event as usual(it's ok). But I am not getting any revert message too for a failed transaction.
And I am getting transaction status null
each and every time using web3j as byzantiumBlock is missing in my genesis file. Then how can I check the transaction status?