public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Max Carrara <m.carrara@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH proxmox{, -backup} 0/4] output full anyhow context in client
Date: Fri, 16 Feb 2024 18:49:42 +0100	[thread overview]
Message-ID: <2700a390-50ee-47f4-8fec-aa38184c440f@proxmox.com> (raw)
In-Reply-To: <20240216153317.323260-1-g.goller@proxmox.com>

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@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(-)
> 





  parent reply	other threads:[~2024-02-16 17:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16 15:33 Gabriel Goller
2024-02-16 15:33 ` [pbs-devel] [PATCH proxmox 1/4] CLI: print fatal errors including causes Gabriel Goller
2024-02-16 15:33 ` [pbs-devel] [PATCH proxmox-backup 2/4] pxar: remove ArchiveError Gabriel Goller
2024-02-16 15:33 ` [pbs-devel] [PATCH proxmox-backup 3/4] pxar: add UniqueContext helper Gabriel Goller
2024-02-16 17:44   ` Max Carrara
2024-02-16 15:33 ` [pbs-devel] [PATCH proxmox-backup 4/4] pxar: use anyhow::Error in PxarBackupStream Gabriel Goller
2024-02-16 17:47   ` Max Carrara
2024-02-19 10:53     ` Gabriel Goller
2024-02-16 17:49 ` Max Carrara [this message]
2024-02-16 17:55   ` [pbs-devel] [PATCH proxmox{, -backup} 0/4] output full anyhow context in client Max Carrara
2024-02-19 10:54     ` Gabriel Goller
2024-02-20 10:30 ` Gabriel Goller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2700a390-50ee-47f4-8fec-aa38184c440f@proxmox.com \
    --to=m.carrara@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal