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

Systematize error-issuing and other printing functions #2129

Open
sauclovian-g opened this issue Oct 12, 2024 · 0 comments
Open

Systematize error-issuing and other printing functions #2129

sauclovian-g opened this issue Oct 12, 2024 · 0 comments
Assignees
Labels
tech debt Issues that document or involve technical debt topics: error-handling Issues involving the way SAW responds to an error condition topics: error-messages Issues involving the messages SAW produces on error

Comments

@sauclovian-g
Copy link
Collaborator

Right now errors are printed and ensuing aborts taken through an incredible variety of functions, some of which print, some of which throw things meant to be printed, some of which apparently do both, some of which allow position reporting (others don't). There's also a whole second variety of functions for random prints that don't directly cause failure. This should all get systematized; we ought to have one function for panics and a small number more for messages of various types and severities, all defined in one place, and everything should use only those functions.

This offers a whole range of benefits, not limited to:

  • make it possible to find all the prints
  • make sure position reporting is possible in all contexts
  • make position formatting consistent everywhere
  • reduce the amount of code on hard-to-test error paths
  • make sure anything that should be printed along with each message (such as "please file a bug report") actually is

Interconnected with #2128. Also more or less a prerequisite for #2075.

@sauclovian-g sauclovian-g added topics: error-messages Issues involving the messages SAW produces on error tech debt Issues that document or involve technical debt topics: error-handling Issues involving the way SAW responds to an error condition labels Oct 12, 2024
@sauclovian-g sauclovian-g self-assigned this Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt Issues that document or involve technical debt topics: error-handling Issues involving the way SAW responds to an error condition topics: error-messages Issues involving the messages SAW produces on error
Projects
None yet
Development

No branches or pull requests

1 participant