EventAnalysis  1.3.0
Classes | Namespaces | Macros | Functions
InsertionExceptions.h File Reference
#include "core/Exception.h"
#include "core/InsertionResult.h"
#include "utils/Demangler.h"

Go to the source code of this file.

Classes

class  EA::Insertion::Exception
 Base class for insertion exceptions. More...
 
class  EA::Insertion::Duplicate
 Exception for trying to insert a duplicate element. More...
 
class  EA::Insertion::NameAliasClash
 Exception for trying to insert an object with a name clash with an existing alias and vice versa. More...
 
class  EA::Insertion::BadAliasedType
 Exception for trying to re-assign an alias to an object with a different class. More...
 
class  EA::Insertion::MissingAliasedObject
 Exception for trying to assign an alias to an object that does not exist. More...
 
class  EA::Insertion::AliasOfAlias
 Exception for trying to assign an alias to an alias. More...
 
class  EA::Insertion::Error
 Exception for generic error in object insertion procedure. More...
 

Namespaces

 EA
 IncludeFileExc.h IncludeFileExc class declaration.
 
 EA::Insertion
 

Macros

#define THROW_INSERTION_EXC(insRes, objName)
 
#define THROW_ALIASING_EXC(insRes, objName, alias)
 

Functions

static std::string EA::Insertion::ExcName (const Exception &exc)
 

Macro Definition Documentation

◆ THROW_ALIASING_EXC

#define THROW_ALIASING_EXC (   insRes,
  objName,
  alias 
)
Value:
switch (insRes) { \
case InsertionResult::NAMEALIASCLASH: \
throw Insertion::NameAliasClash("Clash with existing object for alias \"" + alias + "\""); \
break; \
case InsertionResult::BADALIASEDTYPE: \
throw Insertion::BadAliasedType("Wrong type for object" + objName + "\", can't move the alias \"" + alias + \
"\" to it"); \
break; \
case InsertionResult::MISSINGALIASEDOBJECT: \
throw Insertion::MissingAliasedObject( \
"Object \"" + objName + "\" is not present in the data store, can't set the alias \"" + alias + "\" for it"); \
break; \
case InsertionResult::ALIASOFALIAS: \
throw Insertion::AliasOfAlias("Object name \"" + objName + "\" is actually an alias, can't set an alias for it"); \
break; \
case InsertionResult::ERROR: \
throw Insertion::Error("Error while setting alias \"" + objName + "\""); \
break; \
default: \
throw EA::Exception("Invalid InsertionResult in THROW_ALIASING_EXC"); \
}
Definition: Exception.h:24

◆ THROW_INSERTION_EXC

#define THROW_INSERTION_EXC (   insRes,
  objName 
)
Value:
switch (insRes) { \
case InsertionResult::DUPLICATE: \
throw Insertion::Duplicate("Object \"" + objName + "\" is already present in the data store"); \
break; \
case InsertionResult::NAMEALIASCLASH: \
throw Insertion::NameAliasClash("Clash with existing alias for object \"" + objName + "\""); \
break; \
case InsertionResult::ERROR: \
throw Insertion::Error("Error while inserting object \"" + objName + "\" in the data store"); \
break; \
default: \
throw EA::Exception("Invalid InsertionResult in THROW_INSERTION_EXC"); \
}
Definition: Exception.h:24