Skip to content

Commit

Permalink
gh-104683: Rework Argument Clinic error handling (#107551)
Browse files Browse the repository at this point in the history
Introduce ClinicError, and use it in fail(). The CLI runs main(),
catches ClinicError, formats the error message, prints to stderr
and exits with an error.

As a side effect, this refactor greatly improves the accuracy of
reported line numbers in case of error.

Also, adapt the test suite to work with ClinicError.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
erlend-aasland and AlexWaygood authored Aug 3, 2023
1 parent 017f047 commit 1cd479c
Show file tree
Hide file tree
Showing 2 changed files with 270 additions and 298 deletions.
Loading

0 comments on commit 1cd479c

Please sign in to comment.