Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check actor error codes #1039

Merged
merged 2 commits into from
Jan 13, 2023
Merged

fix: check actor error codes #1039

merged 2 commits into from
Jan 13, 2023

Conversation

Stebalien
Copy link
Member

This commit:

  1. Extracts the actor code checking to methods on the ActorError itself.
  2. Uses them in the EVM.

This commit:

1. Extracts the actor code checking to methods on the ActorError itself.
2. Uses them in the EVM.
@Stebalien
Copy link
Member Author

The full fix is filecoin-project/ref-fvm#1452, but this is a half-step there.

@Stebalien Stebalien force-pushed the next-eam-refactor branch 2 times, most recently from 1af720b to 90febe0 Compare January 13, 2023 06:21
@Stebalien Stebalien changed the base branch from next-eam-refactor to next January 13, 2023 06:23
if !result.exit_code.is_success() {
return Err(ActorError::checked_with_data(
result.exit_code,
format!("failed to call {to} on method {method}"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing the {to} param here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. Rust format strings let you inline variables like that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and they're type-checked at compile time)

@Stebalien Stebalien merged commit f1fcba0 into next Jan 13, 2023
@Stebalien Stebalien deleted the fix/checked-errors branch January 13, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants