Skip to content

Commit

Permalink
Make the IL exceptions include stack traces
Browse files Browse the repository at this point in the history
  • Loading branch information
CouleeApps committed Aug 25, 2023
1 parent c618591 commit 5046073
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions highlevelilinstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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") {}
};

/*!
Expand Down
5 changes: 2 additions & 3 deletions lowlevelilinstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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") {}
};

/*!
Expand Down
5 changes: 2 additions & 3 deletions mediumlevelilinstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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") {}
};

/*!
Expand Down

0 comments on commit 5046073

Please sign in to comment.