On Mon, May 26, 2025 at 04:24:49PM +0200, Paolo Bonzini wrote: > Date: Mon, 26 May 2025 16:24:49 +0200 > From: Paolo Bonzini <pbonz...@redhat.com> > Subject: [PATCH 06/12] util/error: make func optional > X-Mailer: git-send-email 2.49.0 > > The function name is not available in Rust, so make it optional. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > util/error.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-)
panic::Location does not provide function name information. Although there are macros that could print function names [*] (as I'm sure you've noticed :) ), that way - printing the information based on some macros - would definitely require some wrapping or modification of Err(). Comparing with that, current implementation looks better in general. [*]: https://stackoverflow.com/a/63904992/24336517 Reviewed-by: Zhao Liu <zhao1....@intel.com>