Add more specific error messages for X11 failed initialization
This ensures that, when X11 initialization fails, we know exactly why.
cc #3671
Signed-off-by: John Nunley [email protected]
- [ ] Tested on all platforms changed
- [ ] Added an entry to the
changelogmodule if knowledge of this change could be valuable to users - [x] Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
- [x] Created or updated an example program if it would help users understand this functionality
- [x] Updated feature matrix, if new features were added or implemented
In general, I think the better approach is to add proper annotation for the errors themselves.
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
Huh, I thought it was? Okay then, this can be fixed
Everything inside the platform_impl is private, only platform is public.
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.
Since you've brought it in #3883, why not route everything into OsError, should be pretty much conservative and provide all the things needed?
You should also just forward the EventLoopError from the X11 backend like Wayland does.