Refactor section creation errors, and simplify output for single errors#1964
Merged
Conversation
ISSOtm
requested changes
May 1, 2026
ISSOtm
left a comment
Member
There was a problem hiding this comment.
There's a reason I'm not writing C++ anymore...
ISSOtm
approved these changes
May 21, 2026
ISSOtm
left a comment
Member
There was a problem hiding this comment.
Well, I still don't like these changes too much, but we've established that this is due to value differences that the solution to is me switching to Rust. So I'm not going to block this any longer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The refactoring here is because the
#define sectErrormacro was an awkward hack, relying on each of its callers to have a variable specifically callednbSectErrors.The simplification is because most
sectErrors are exclusive (note all theif-elsechains) so you rarely end up with more than one (note that I had to add a new test for multiple errors with the same section). Comparing these two outputs:errorthat says "Section had this specific flaw", followed byFATAL"Cannot create section "<name>" (1 error)"FATAL"Section "<name>" had this specific flaw"I find the latter new output easier to read, and less likely for inexperienced users to tunnel-vision read the very last error and miss its context. (Especially when they just post a screenshot/quote of the last error.)