32 ss <<
" at function " << m_Function
33 <<
" [" << m_File <<
':' << m_Line <<
"]";
40 ss <<
" [" << m_File <<
':' << m_Line <<
"]";
49 explicit Exception(
const std::string& message);
52 explicit Exception(
const std::string& message,
58 const std::string& message,
61 virtual const char* what()
const noexcept
override;
64 std::string m_Message;
77 using BackendUnavailableException::BackendUnavailableException;
140 template <
typename ExceptionType>
145 throw ExceptionType(message);
154 template <
typename ExceptionType,
typename ComparedType>
156 const ComparedType& leftHandSide,
157 const ComparedType& rightHandSide)
159 if (!(leftHandSide == rightHandSide))
161 std::stringstream ss;
162 ss << message <<
" : " << leftHandSide <<
" != " << rightHandSide;
163 throw ExceptionType(ss.str());
169 #define CHECK_LOCATION() armnn::CheckLocation(__func__, __FILE__, __LINE__)
std::string FileLine() const
CheckLocation(const char *func, const char *file, unsigned int line)
Exception(const std::string &message)
void ConditionalThrowIfNotEqual(const std::string &message, const ComparedType &leftHandSide, const ComparedType &rightHandSide)
Base class for all ArmNN exceptions so that users can filter to just those.
void ConditionalThrow(bool condition, const std::string &message)
Class for non-fatal exceptions raised while initialising a backend.
std::string AsString() const