From 5046073446456512359493848692557442235294 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Thu, 17 Aug 2023 17:24:21 -0400 Subject: Make the IL exceptions include stack traces --- highlevelilinstruction.h | 5 ++--- lowlevelilinstruction.h | 5 ++--- mediumlevelilinstruction.h | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/highlevelilinstruction.h b/highlevelilinstruction.h index 502dd582..0476a182 100644 --- a/highlevelilinstruction.h +++ b/highlevelilinstruction.h @@ -167,11 +167,10 @@ namespace BinaryNinja /*! \ingroup highlevelil */ - class HighLevelILInstructionAccessException : public std::exception + class HighLevelILInstructionAccessException : public ExceptionWithStackTrace { public: - HighLevelILInstructionAccessException() : std::exception() {} - virtual const char* what() const NOEXCEPT { return "invalid access to HLIL instruction"; } + HighLevelILInstructionAccessException() : ExceptionWithStackTrace("invalid access to HLIL instruction") {} }; /*! diff --git a/lowlevelilinstruction.h b/lowlevelilinstruction.h index 7557a1ec..99aba8ad 100644 --- a/lowlevelilinstruction.h +++ b/lowlevelilinstruction.h @@ -355,11 +355,10 @@ namespace BinaryNinja /*! \ingroup lowlevelil */ - class LowLevelILInstructionAccessException : public std::exception + class LowLevelILInstructionAccessException : public ExceptionWithStackTrace { public: - LowLevelILInstructionAccessException() : std::exception() {} - virtual const char* what() const NOEXCEPT { return "invalid access to LLIL instruction"; } + LowLevelILInstructionAccessException() : ExceptionWithStackTrace("invalid access to LLIL instruction") {} }; /*! diff --git a/mediumlevelilinstruction.h b/mediumlevelilinstruction.h index 90d2700c..bcac516b 100644 --- a/mediumlevelilinstruction.h +++ b/mediumlevelilinstruction.h @@ -205,11 +205,10 @@ namespace BinaryNinja /*! \ingroup mediumlevelil */ - class MediumLevelILInstructionAccessException : public std::exception + class MediumLevelILInstructionAccessException : public ExceptionWithStackTrace { public: - MediumLevelILInstructionAccessException() : std::exception() {} - virtual const char* what() const NOEXCEPT { return "invalid access to MLIL instruction"; } + MediumLevelILInstructionAccessException() : ExceptionWithStackTrace("invalid access to MLIL instruction") {} }; /*! -- cgit v1.3.1