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

errors: Remove log::error in server #1881

Merged
merged 14 commits into from
Nov 8, 2022

Conversation

har7an
Copy link
Contributor

@har7an har7an commented Oct 30, 2022

and replace it with variations of Err....non_fatal() to preserve more information in the error log messages.

@har7an har7an force-pushed the errors/remove-log-error-in-server branch from 8543f5d to 48d3ebc Compare October 30, 2022 06:40
@har7an har7an temporarily deployed to cachix October 30, 2022 06:40 Inactive
@har7an har7an force-pushed the errors/remove-log-error-in-server branch from 48d3ebc to a68a83f Compare November 2, 2022 05:39
@har7an har7an temporarily deployed to cachix November 2, 2022 05:39 Inactive
har7an added a commit to har7an/zellij that referenced this pull request Nov 2, 2022
@har7an har7an temporarily deployed to cachix November 2, 2022 06:28 Inactive
with better error logging by means of `non_fatal`. This preserves the
original error and allows adding context information on top. Also makes
error formatting more uniform across the application.
with better error logging by means of `non_fatal`. This preserves the
original error and allows adding context information on top. Also makes
error formatting more uniform across the application.
and propagate the error to the caller instead.
with better error logging by means of `non_fatal`. This preserves the
original error and allows adding context information on top. Also makes
error formatting more uniform across the application.

Also add per-instruction error context to make it clear what we tried to
accomplish when an error occured.
and sort them into a better order.
with better error logging by means of `non_fatal`. This preserves the
original error and allows adding context information on top. Also makes
error formatting more uniform across the application.
and sort them into a better order.
with better error logging by means of `non_fatal`. This preserves the
original error and allows adding context information on top. Also makes
error formatting more uniform across the application.
for terminals IDs that don't exist, instead of propagating the error to
the user.
rather than providing a hard-coded error reason which is plain wrong in
this context.
@har7an har7an force-pushed the errors/remove-log-error-in-server branch from d4a8d1c to de844f9 Compare November 8, 2022 10:10
@har7an har7an temporarily deployed to cachix November 8, 2022 10:10 Inactive
and change `get_active_tab(_mut)?` to return a `Result` instead of an
`Option`. This already makes many places in the code obsolete where
previously "failed to get active tab..." was logged manually.

Rather than logging, use the `anyhow::Error`s we have, along with all
their context information, and log these instead.
@har7an har7an force-pushed the errors/remove-log-error-in-server branch from de844f9 to 097194f Compare November 8, 2022 10:12
@har7an har7an temporarily deployed to cachix November 8, 2022 10:12 Inactive
@har7an har7an merged commit 4531427 into zellij-org:main Nov 8, 2022
@har7an har7an deleted the errors/remove-log-error-in-server branch December 13, 2022 07:27
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.

1 participant