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

meson format: unhandled python exception with invalid value types #13565

Closed
dcbaker opened this issue Aug 19, 2024 · 0 comments · Fixed by #13572
Closed

meson format: unhandled python exception with invalid value types #13565

dcbaker opened this issue Aug 19, 2024 · 0 comments · Fixed by #13572

Comments

@dcbaker
Copy link
Member

dcbaker commented Aug 19, 2024

Describe the bug
Using an invalid type (or something that ConfigParser thinks is invalid, anyway) causes an uncaught python exception. This needs to be caught and given a graceful MesonException instead.

To Reproduce
Create a meson.format with the following:

wide_colon = true;

(note the trailing semi-colon, I've been doing too much C). And then run meson format, get a nice traceback.

Expected behavior
Provide a more helpful error message and no traceback.

system parameters
Meson 1.5 and meson master from git (cdf646f)

dcbaker added a commit to dcbaker/meson that referenced this issue Aug 19, 2024
…value

I ran into this with `option = true;` (not the trailing `;`). Now we
provide a nicer message instead of an uncaught Python traceback.

Closes: mesonbuild#13565
dcbaker added a commit to dcbaker/meson that referenced this issue Aug 19, 2024
…value

I ran into this with `option = true;` (not the trailing `;`). Now we
provide a nicer message instead of an uncaught Python traceback.

Closes: mesonbuild#13565
dcbaker added a commit to dcbaker/meson that referenced this issue Aug 20, 2024
…value

I ran into this with `option = true;` (note the trailing `;`). Now we
provide a nicer message instead of an uncaught Python backtrace.

Closes: mesonbuild#13565
dcbaker added a commit to dcbaker/meson that referenced this issue Aug 20, 2024
…value

I ran into this with `option = true;` (note the trailing `;`). Now we
provide a nicer message instead of an uncaught Python backtrace.

Closes: mesonbuild#13565
eli-schwartz pushed a commit that referenced this issue Sep 16, 2024
…value

I ran into this with `option = true;` (note the trailing `;`). Now we
provide a nicer message instead of an uncaught Python backtrace.

Closes: #13565
(cherry picked from commit 1e6e4c8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant