From 32a0434bc3c8809cd625f65a087ea50439b59b63 Mon Sep 17 00:00:00 2001 From: Steffen Eiden Date: Tue, 20 Feb 2024 12:09:49 +0100 Subject: [PATCH] rust/pv_core: Always report rc and rrc for an UV error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The (non-archiected) rrc helps to debug issues. Therefore report them also in release builds. Signed-off-by: Steffen Eiden Reviewed-by: Julian Ruess Signed-off-by: Jan Höppner --- rust/pv_core/src/error.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rust/pv_core/src/error.rs b/rust/pv_core/src/error.rs index ac922d5d..aefa241a 100644 --- a/rust/pv_core/src/error.rs +++ b/rust/pv_core/src/error.rs @@ -10,8 +10,7 @@ pub type Result = std::result::Result; #[derive(thiserror::Error, Debug)] #[non_exhaustive] pub enum Error { - #[cfg_attr(debug_assertions, error("Ultravisor: '{msg}' ({rc:#06x},{rrc:#06x})"))] - #[cfg_attr(not(debug_assertions), error("Ultravisor: '{msg}' ({rc:#06x})"))] + #[error("Ultravisor: '{msg}' ({rc:#06x},{rrc:#06x})")] Uv { rc: u16, rrc: u16,