mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 01:28:21 -05:00
Match statement for handling error messages - reverted and default case (#3640)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@@ -161,7 +161,10 @@ impl CallTrace {
|
||||
|
||||
/// Returns the error message if it is an erroneous result.
|
||||
pub(crate) fn as_error(&self) -> Option<String> {
|
||||
self.is_error().then(|| format!("{:?}", self.status))
|
||||
self.is_error().then(|| match self.status {
|
||||
InstructionResult::Revert => "Reverted".to_string(),
|
||||
status => format!("{:?}", status),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user