ArmNN
 24.08
Exceptions.hpp File Reference
#include <sstream>
#include <stdexcept>
#include <string>
Include dependency graph for Exceptions.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CheckLocation
 
class  Exception
 Base class for all ArmNN exceptions so that users can filter to just those. More...
 
class  BackendUnavailableException
 Class for non-fatal exceptions raised while initialising a backend. More...
 
class  ClRuntimeUnavailableException
 
class  InvalidArgumentException
 
class  FileNotFoundException
 
class  ParseException
 
class  UnimplementedException
 
class  LayerValidationException
 
class  GraphValidationException
 
class  BadOptionalAccessException
 
class  RuntimeException
 
class  MemoryImportException
 
class  MemoryExportException
 
class  TimeoutException
 
class  PolymorphicDowncastException
 
class  NullPointerException
 
class  BackendCapabilityException
 
class  MemoryValidationException
 

Namespaces

 armnn
 Copyright (c) 2021 ARM Limited and Contributors.
 

Macros

#define CHECK_LOCATION()   armnn::CheckLocation(__func__, __FILE__, __LINE__)
 
#define ARMNN_THROW_MSG_IF_FALSE(_cond, _except, _str)   do { if (!(static_cast<bool>(_cond))) {throw _except(_str);} } while(0)
 
#define ARMNN_THROW_IF_FALSE(_cond, _except)   ARMNN_THROW_MSG_IF_FALSE(_cond, _except, #_cond)
 
#define ARMNN_THROW_INVALIDARG_MSG_IF_FALSE(_cond, _str)   ARMNN_THROW_MSG_IF_FALSE(_cond, armnn::InvalidArgumentException, _str)
 
#define ARMNN_THROW_INVALIDARG_IF_FALSE(_cond)   ARMNN_THROW_MSG_IF_FALSE(_cond, armnn::InvalidArgumentException, #_cond)
 

Functions

template<typename ExceptionType >
void ConditionalThrow (bool condition, const std::string &message)
 
template<typename ExceptionType >
void ConditionalThrow (bool condition)
 
template<typename ExceptionType , typename ComparedType >
void ConditionalThrowIfNotEqual (const std::string &message, const ComparedType &leftHandSide, const ComparedType &rightHandSide)
 ComparedType must support: operator==(const ComparedType&) operator<<(ostream&, const ComparedType&) More...
 

Macro Definition Documentation

◆ ARMNN_THROW_IF_FALSE

#define ARMNN_THROW_IF_FALSE (   _cond,
  _except 
)    ARMNN_THROW_MSG_IF_FALSE(_cond, _except, #_cond)

Definition at line 208 of file Exceptions.hpp.

◆ ARMNN_THROW_INVALIDARG_IF_FALSE

#define ARMNN_THROW_INVALIDARG_IF_FALSE (   _cond)    ARMNN_THROW_MSG_IF_FALSE(_cond, armnn::InvalidArgumentException, #_cond)

Definition at line 212 of file Exceptions.hpp.

◆ ARMNN_THROW_INVALIDARG_MSG_IF_FALSE

#define ARMNN_THROW_INVALIDARG_MSG_IF_FALSE (   _cond,
  _str 
)    ARMNN_THROW_MSG_IF_FALSE(_cond, armnn::InvalidArgumentException, _str)

Definition at line 210 of file Exceptions.hpp.

◆ ARMNN_THROW_MSG_IF_FALSE

#define ARMNN_THROW_MSG_IF_FALSE (   _cond,
  _except,
  _str 
)    do { if (!(static_cast<bool>(_cond))) {throw _except(_str);} } while(0)

Definition at line 206 of file Exceptions.hpp.

◆ CHECK_LOCATION

#define CHECK_LOCATION ( )    armnn::CheckLocation(__func__, __FILE__, __LINE__)

Definition at line 203 of file Exceptions.hpp.