Skip to content

Commit

Permalink
transmute fatal errors into SYS_ASSERTION_FAILED exit code.
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk committed May 11, 2022
1 parent 26c6f4c commit c2bf65f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions fvm/src/executor/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,21 @@ where
}
}
Err(ExecutionError::Fatal(e)) => {
return Err(e.context(format!(
// Annotate the error with the message context.
let _err = e.context(format!(
"[from={}, to={}, seq={}, m={}, h={}] fatal error",
msg.from,
msg.to,
msg.sequence,
msg.method_num,
self.context().epoch
)));
));
// TODO backtrace
Receipt {
exit_code: ExitCode::SYS_ASSERTION_FAILED,
return_data: Default::default(),
gas_used: msg.gas_limit,
}
}
};

Expand Down

0 comments on commit c2bf65f

Please sign in to comment.