From 11c481cec218246bd9a5d51919c0e236fbe4b324 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Mon, 5 Jun 2023 15:17:16 +0200 Subject: [PATCH] adds verbosity to error --- src/iss/arch/riscv_hart_m_p.h | 4 ++-- src/iss/arch/riscv_hart_msu_vp.h | 4 ++-- src/iss/arch/riscv_hart_mu_p.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/iss/arch/riscv_hart_m_p.h b/src/iss/arch/riscv_hart_m_p.h index 1111146..af8f835 100644 --- a/src/iss/arch/riscv_hart_m_p.h +++ b/src/iss/arch/riscv_hart_m_p.h @@ -619,9 +619,9 @@ template std::pair riscv_hart_m } return std::make_pair(entry, true); } - throw std::runtime_error("memory load file is not a valid elf file"); + throw std::runtime_error(fmt::format("memory load file {} is not a valid elf file",name)); } - throw std::runtime_error("memory load file not found"); + throw std::runtime_error(fmt::format("memory load file not found, check if {} is a valid file", name)); } template diff --git a/src/iss/arch/riscv_hart_msu_vp.h b/src/iss/arch/riscv_hart_msu_vp.h index 49d1363..ab77357 100644 --- a/src/iss/arch/riscv_hart_msu_vp.h +++ b/src/iss/arch/riscv_hart_msu_vp.h @@ -583,9 +583,9 @@ template std::pair riscv_hart_msu_vp::load } return std::make_pair(entry, true); } - throw std::runtime_error("memory load file is not a valid elf file"); + throw std::runtime_error(fmt::format("memory load file {} is not a valid elf file",name)); } - throw std::runtime_error("memory load file not found"); + throw std::runtime_error(fmt::format("memory load file not found, check if {} is a valid file", name)); } template diff --git a/src/iss/arch/riscv_hart_mu_p.h b/src/iss/arch/riscv_hart_mu_p.h index 513ca20..3ee9cd7 100644 --- a/src/iss/arch/riscv_hart_mu_p.h +++ b/src/iss/arch/riscv_hart_mu_p.h @@ -689,9 +689,9 @@ template std::pair riscv_hart_m } return std::make_pair(entry, true); } - throw std::runtime_error("memory load file is not a valid elf file"); + throw std::runtime_error(fmt::format("memory load file {} is not a valid elf file",name)); } - throw std::runtime_error("memory load file not found"); + throw std::runtime_error(fmt::format("memory load file not found, check if {} is a valid file", name)); } template