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

Exit debug #2554

Merged
merged 5 commits into from
May 16, 2023
Merged

Exit debug #2554

merged 5 commits into from
May 16, 2023

Conversation

willmcgugan
Copy link
Collaborator

@willmcgugan willmcgugan commented May 12, 2023

Some fatal errors will cause a cascade of additional errors. Generally the first one is most relevant.

  • Show a single error on exit by default, and a message if there are any hidden.
  • Show all messages in dev mode. If there are more than one, show the amount.

Fixes #2480

Screenshot 2023-05-12 at 18 05 39 Screenshot 2023-05-12 at 18 05 26

@willmcgugan willmcgugan marked this pull request as draft May 12, 2023 15:54
@willmcgugan willmcgugan marked this pull request as ready for review May 12, 2023 16:06
Comment on lines +1641 to +1647
elif self._exit_renderables:
self.error_console.print(self._exit_renderables[0])
if error_count > 1:
self.error_console.print(
f"\n[b]NOTE:[/b] 1 of {error_count} errors show. Run with [b]--dev[/] to see all errors.",
markup=True,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense. At the same time, the error(s) may show up unexpectedly and the user may not be able to reproduce them. Would it make even more sense to write the remaining errors to a log?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If logging is enabled, these will still go to the logs.

@willmcgugan willmcgugan merged commit 3a17a76 into main May 16, 2023
@willmcgugan willmcgugan deleted the exit-debug branch May 16, 2023 20:34
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.

Confusing ValueError: No Tab with id 'tab-1' when a NoMatches is expected
2 participants