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

Require Park::Error: Debug for better panic messages. #3641

Merged
merged 1 commit into from Apr 8, 2021

Conversation

goffrie
Copy link
Contributor

@goffrie goffrie commented Mar 24, 2021

Motivation

We are seeing a few "failed to park" panics in the wild. The panic messages are very unhelpful as they don't contain information about the underlying error.

Solution

Add a fmt::Debug constraint to Park::Error. This trait is internal and all implementors already satisfy it. Then we can use expect() on the result of park() directly.

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime labels Mar 24, 2021
@Darksonn
Copy link
Contributor

Darksonn commented Mar 24, 2021

Are you able to get useful error messages if you use your PR's fork via [patch.crates-io]? What does it say?

@Darksonn Darksonn merged commit 1d56552 into tokio-rs:master Apr 8, 2021
@goffrie goffrie deleted the park-error branch May 12, 2021 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants