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

Get request name from an error #314

Closed
psychon opened this issue Mar 28, 2020 · 1 comment
Closed

Get request name from an error #314

psychon opened this issue Mar 28, 2020 · 1 comment
Labels
enhancement New feature or request P3 Priority Middle

Comments

@psychon
Copy link
Owner

psychon commented Mar 28, 2020

From the output of examples/simple_window_manager.rs on Travis:

Got event Error(XprotoNameError(NameError { response_type: 0, error_code: 15, sequence: 3, bad_value: 2097153, minor_opcode: 0, major_opcode: 45 }))
Got event Error(XprotoFontError(FontError { response_type: 0, error_code: 7, sequence: 4, bad_value: 0, minor_opcode: 0, major_opcode: 55 }))
Got event Error(XprotoFontError(FontError { response_type: 0, error_code: 7, sequence: 5, bad_value: 2097153, minor_opcode: 0, major_opcode: 46 }))

It would be nice if the minor_opcode and major_opcode could somehow be turned into the name of the request that error'd.

However, no idea yet on how to do that, API-wise. Perhaps: Have an request_name: Option<&'static str> in errors. (Or, instead of Option: Let it default to "unknown")

@psychon psychon added enhancement New feature or request P3 Priority Middle labels Mar 28, 2020
This was referenced Mar 29, 2020
@psychon
Copy link
Owner Author

psychon commented Apr 2, 2020

Uhm. The core protocol has the necessary information in errors. Extensions do not necessarily do this, e.g. render.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3 Priority Middle
Projects
None yet
Development

No branches or pull requests

1 participant