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

Error reporting extensions. #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ximon18
Copy link
Member

@ximon18 ximon18 commented Nov 27, 2024

This builds on the work already done by @bal-e to:

  • Determine the terminal status from the actual stream an error is written to.
  • Factor out colourisation to the stream which knows if it is a terminal or not.
  • Add support for yellow warnings as well as red errors.
  • Add a line break at the end of written errors/warnings.

…itten to.

- Factor out colourisation to the stream which knows if it is a terminal or not.
- Add support for yellow warnings as well as red errors.
@ximon18 ximon18 requested a review from a team November 27, 2024 09:02
Copy link
Member

@mozzieongit mozzieongit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(See my train of thought in the following paragraphs ^^)

I feel like this is missing the warning interactions (like writing them to stderr).

Also this seems like we're extending the error type to be basically a logging type (error vs warning and next maybe info and notice?) with context.

Would a logging module be better suited for this? In the current state, the warning seems to be stored in the error chain, but not printed, unless the commands return Error, which it hopefully doesn't, when there are no errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants