Open
Bug 1486380
Opened 8 years ago
Updated 4 years ago
Code generators can never handle ParserError
Categories
(Toolkit :: Telemetry, enhancement, P3)
Toolkit
Telemetry
Tracking
()
NEW
People
(Reporter: janerik, Unassigned)
Details
Our Python code generators try to handle, log and fail when a ParserError is hit, e.g. https://searchfox.org/mozilla-central/rev/e126996d9b0a3d7653de205898517f4f5b632e7f/toolkit/components/telemetry/gen_histogram_enum.py#50-52
However, `parse_histograms` never actually throws that exception. Instead it is either handled immediately, exiting the program, or recorded and through an `atexit` handler fails the build at the end of the script.
Additionally code like [2] doesn't end the function, so following pieces of code will still execute (and then fail because of the exact condition we checked before)
[2]: https://searchfox.org/mozilla-central/rev/e126996d9b0a3d7653de205898517f4f5b632e7f/toolkit/components/telemetry/parse_histograms.py#251-253
We should eventually clean this up.
Comment 1•8 years ago
|
||
Of note, we intend to roll parse_* into their own "product" at some point. Registering an `atexit` handler isn't very user-friendly for such a product, so maybe a dash of rearchitecting is deserved?
Updated•8 years ago
|
Priority: -- → P2
Updated•7 years ago
|
Priority: P2 → P3
Updated•4 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•