[pbs-devel] [PATCH proxmox{, -backup} 0/4] output full anyhow context in client
Max Carrara
m.carrara at proxmox.com
Fri Feb 16 18:49:42 CET 2024
On 2/16/24 16:33, Gabriel Goller wrote:
> Instead of using format_err! and format! to create error messages, we
> want to move to anyhow::Context and add information to already
> existing anyhow::Error's.
> Before we start to gradually phase out the format! error calls, we
> need to print the whole context + error, because the default
> anyhow::Error Display implementation doesn't print the actual error.
>
> This series starts with the proxmox-backup-client and includes a patch
> from Fabian that introduces pretty-printing of errors (including
> the context) and some other high-level stuff from me. The scope
> is not to remove every format call and add a context everywhere,
> but to enable this change in the future.
>
Some comments inline, but otherwise a good way to clean up some of our
error handling and how we display things. Will test on Monday, but apart
from what I've already mentioned, looks pretty good!
Reviewed-by: Max Carrara <m.carrara at proxmox.com>
>
>
> proxmox:
>
> Fabian Grünbichler (1):
> CLI: print fatal errors including causes
>
> proxmox-router/src/cli/command.rs | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>
> proxmox-backup:
>
> Gabriel Goller (3):
> pxar: remove ArchiveError
> pxar: add UniqueContext helper
> pxar: use anyhow::Error in PxarBackupStream
>
> pbs-client/src/pxar/create.rs | 49 ++++++++++++++--------------
> pbs-client/src/pxar_backup_stream.rs | 20 +++++++-----
> 2 files changed, 35 insertions(+), 34 deletions(-)
>
>
> Summary over all repositories:
> 3 files changed, 37 insertions(+), 36 deletions(-)
>
More information about the pbs-devel
mailing list