-
Notifications
You must be signed in to change notification settings - Fork 13k
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
thread '<main>' panicked at 'called Result::unwrap()
on an Err
value: Error { repr: Os(1455) }'
#25638
Comments
Hey @jeroldhaas , thanks for the report. What specifically is the action to take here? Is it about a better error message, or explaining what's going on? |
@steveklabnik : Ultimately, a more informative error message would be best. A user unfamiliar with the language (such as myself) may encounter an error such as this and be left to divination techniques to try and decipher what the issue was at that moment in the thread where it panicked. That said, there may be an issue with thread management here, but deciphering the panic message seems quite impenetrably opaque with the message currently given, so... Now what? AFAIK (as a beginner), using |
So there's always a tension between these kinds of things in examples: super robust error handling gets in the way of what the example is trying to convey. In this case, the default message for errors just shows the very basics. In this case, that we got an OS-specific error code, and that that code was
|
I understand. I'd be happy to re-run this tonight and give you the full As for |
Given the platform, you can always lookup the error (https://msdn.microsoft.com/en-us/library/windows/desktop/ms681385(v=vs.85).aspx#ERROR_COMMITMENT_LIMIT). Unwrap is being called on a |
@Stebalien my point was that if there was an API to look up these codes to return their accompanying user-friendly strings from the system, or a collection of a sort in an error codes package with info for each platform, the developer/user wouldn't have to go searching for what these esoteric error numbers might be. |
It would be really nice if |
I'm changing this to libs, because it's not clear to me how to change these docs. We may or may not want to change the representation of |
This came up in the |
Triage: no changes I'm aware of |
Was fixed by me: #26416 |
Error:
Code found (& system-torture enhanced) from online Rust book Ch 3.3 (embed project example).
I'd modified the thread count from original 11 threads to 10,000,001 threads to see how / if a thread limit would be reached. I'm assuming this may be the initial cause for the panic, however
Os(1455)
doesn't really describe anError
's repr very well._As I'm not completely familiar with Rust, I was advised to submit this as an issue by someone more familiar with the language._
See (modified) code example below for repro:
Platform:
The text was updated successfully, but these errors were encountered: