Class RevertMessageParser
java.lang.Object
org.fisco.bcos.sdk.transaction.codec.decode.RevertMessageParser
public class RevertMessageParser
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static Function
revertFunction
static java.lang.String
RevertMethod
static java.lang.String
RevertMethodWithHexPrefix
static java.lang.String
SMRevertMethod
static java.lang.String
SMRevertMethodWithHexPrefix
-
Constructor Summary
Constructors Constructor Description RevertMessageParser()
-
Method Summary
Modifier and Type Method Description static boolean
hasRevertMessage(java.lang.String status, java.lang.String output)
static boolean
isOutputStartWithRevertMethod(java.lang.String output)
Does output start with the code of the Revert method, If so, the output may be error messagestatic Tuple2<java.lang.Boolean,java.lang.String>
tryResolveRevertMessage(java.lang.String status, java.lang.String output)
static Tuple2<java.lang.Boolean,java.lang.String>
tryResolveRevertMessage(TransactionReceipt receipt)
-
Field Details
-
RevertMethod
public static final java.lang.String RevertMethod- See Also:
- Constant Field Values
-
RevertMethodWithHexPrefix
public static final java.lang.String RevertMethodWithHexPrefix- See Also:
- Constant Field Values
-
SMRevertMethod
public static final java.lang.String SMRevertMethod- See Also:
- Constant Field Values
-
SMRevertMethodWithHexPrefix
public static final java.lang.String SMRevertMethodWithHexPrefix- See Also:
- Constant Field Values
-
revertFunction
-
-
Constructor Details
-
RevertMessageParser
public RevertMessageParser()
-
-
Method Details
-
isOutputStartWithRevertMethod
public static boolean isOutputStartWithRevertMethod(java.lang.String output)Does output start with the code of the Revert method, If so, the output may be error message- Parameters:
output
- the string of output- Returns:
- true/false
-
hasRevertMessage
public static boolean hasRevertMessage(java.lang.String status, java.lang.String output)- Parameters:
status
- the status of the receiptoutput
- the output of the receipt- Returns:
- true/false
-
tryResolveRevertMessage
public static Tuple2<java.lang.Boolean,java.lang.String> tryResolveRevertMessage(java.lang.String status, java.lang.String output)- Parameters:
status
- the transaction receipt statusoutput
- the output of the transaction receipt- Returns:
- the resolved revert message information
-
tryResolveRevertMessage
public static Tuple2<java.lang.Boolean,java.lang.String> tryResolveRevertMessage(TransactionReceipt receipt)- Parameters:
receipt
- the receipt need to be parsed- Returns:
- the resolved revert message information
-