update Revert Message display
@@ -88,11 +88,16 @@ public class ChannelEthereumService extends org.fisco.bcos.web3j.protocol.Servic
callResult.getStatus(), callResult.getOutput());
if (revertMessage.getValue1()) {
logger.debug(" revert message: {}", revertMessage.getValue2());
- throw new ContractCallException(revertMessage.getValue2());
- } else {
+ // throw new ContractCallException(revertMessage.getValue2());
+ }
+
if (StatusCode.RevertInstruction.equals(callResult.getStatus())) {
throw new ContractCallException(
- "The execution of the contract rolled back.");
+ "The execution of the contract rolled back"
+ + (revertMessage.getValue1()
+ ? ", " + revertMessage.getValue2()
+ : "")
+ + ".");
}
if (StatusCode.CallAddressError.equals(callResult.getStatus())) {
throw new ContractCallException("The contract address is incorrect.");
@@ -103,7 +108,6 @@ public class ChannelEthereumService extends org.fisco.bcos.web3j.protocol.Servic
StatusCode.getStatusMessage(callResult.getStatus()));
}
}
- }
return t;
} catch (ContractCallException e) {
throw e;
