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
Add more specific error messages for X11 failed initialization #3679
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I think the better approach is to add proper annotation for the errors themselves.
Not sure how visible the tracing stuff would be when you actually boil from winit and likely exit, etc.
Agreed, but this would require a breaking change. |
But X11 error is not a public API, so you'd just change the internal layout? |
Huh, I thought it was? Okay then, this can be fixed |
Everything inside the |
@@ -17,7 +17,17 @@ pub enum ExternalError { | |||
/// The error type for when the requested operation is not supported by the backend. | |||
#[derive(Clone)] | |||
pub struct NotSupportedError { | |||
_marker: (), | |||
inner: NotSupportedRepr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we do it uniformly with the rest of the errors? Since we generally point to platform_impl
from here?
Though, in the current state of things it doesn't matter that much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would add a lot of additional code for little benefit
This ensures that, when X11 initialization fails, we know exactly why. cc #3671 Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: John Nunley <dev@notgull.net>
cc9e7e2
to
948f2a6
Compare
I'm still not entirely sure what to do with this and I think it'll add more boilerplate when splitting backends... So, I'll keep it around for now because the change is rather small internally and provides no practical value, since all the info available in e.g. strace if you debug things like failed to load dynamic library. |
This ensures that, when X11 initialization fails, we know exactly why.
cc #3671
Signed-off-by: John Nunley dev@notgull.net
changelog
module if knowledge of this change could be valuable to users