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

runner: Change transact block error mesage #3418

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

leoyvens
Copy link
Collaborator

@leoyvens leoyvens commented Apr 1, 2022

And remove the match by leveraging context and ?. Read with whitespace diff disabled.

@@ -149,7 +149,7 @@ pub enum IngestorError {
ReceiptUnavailable(H256, H256),

/// An unexpected error occurred.
#[error("Ingestor error: {0}")]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is an unrelated improvement to print ingestor errors with causes.

data_sources,
deterministic_errors,
)
.context("Failed to transact block operations")?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this create multiple lines like @lutter mentioned the other day? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only if printed as {:?}, and the places that print this use {:#} and actually explicitly remove any newlines that sneak in due to wasm stack traces

let message = format!("{:#}", e).replace("\n", "\t");

@leoyvens leoyvens force-pushed the leo/change-transact-block-err-msg branch from b261c8a to c3432bc Compare April 4, 2022 11:32
@leoyvens leoyvens merged commit 5b2e546 into master Apr 4, 2022
@leoyvens leoyvens deleted the leo/change-transact-block-err-msg branch April 4, 2022 15:04
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.

2 participants