8 #ifndef INSERTIONEXCEPTIONS_H_ 9 #define INSERTIONEXCEPTIONS_H_ 62 #define THROW_INSERTION_EXC(insRes, objName) \ 64 case InsertionResult::DUPLICATE: \ 65 throw Insertion::Duplicate("Object \"" + objName + "\" is already present in the data store"); \ 67 case InsertionResult::NAMEALIASCLASH: \ 68 throw Insertion::NameAliasClash("Clash with existing alias for object \"" + objName + "\""); \ 70 case InsertionResult::ERROR: \ 71 throw Insertion::Error("Error while inserting object \"" + objName + "\" in the data store"); \ 74 throw EA::Exception("Invalid InsertionResult in THROW_INSERTION_EXC"); \ 77 #define THROW_ALIASING_EXC(insRes, objName, alias) \ 79 case InsertionResult::NAMEALIASCLASH: \ 80 throw Insertion::NameAliasClash("Clash with existing object for alias \"" + alias + "\""); \ 82 case InsertionResult::BADALIASEDTYPE: \ 83 throw Insertion::BadAliasedType("Wrong type for object" + objName + "\", can't move the alias \"" + alias + \ 86 case InsertionResult::MISSINGALIASEDOBJECT: \ 87 throw Insertion::MissingAliasedObject( \ 88 "Object \"" + objName + "\" is not present in the data store, can't set the alias \"" + alias + "\" for it"); \ 90 case InsertionResult::ALIASOFALIAS: \ 91 throw Insertion::AliasOfAlias("Object name \"" + objName + "\" is actually an alias, can't set an alias for it"); \ 93 case InsertionResult::ERROR: \ 94 throw Insertion::Error("Error while setting alias \"" + objName + "\""); \ 97 throw EA::Exception("Invalid InsertionResult in THROW_ALIASING_EXC"); \ 103 excName = excName.substr(15);
Duplicate(std::string msg="Duplicate")
Definition: InsertionExceptions.h:29
Exception for trying to insert a duplicate element.
Definition: InsertionExceptions.h:27
Exception for trying to assign an alias to an object that does not exist.
Definition: InsertionExceptions.h:45
AliasOfAlias(std::string msg="AliasOfAlias")
Definition: InsertionExceptions.h:53
Exception for trying to insert an object with a name clash with an existing alias and vice versa...
Definition: InsertionExceptions.h:33
static std::string ExcName(const Exception &exc)
Definition: InsertionExceptions.h:100
std::string ClassName(const T &obj)
Function which returns the name of the class.
Definition: Demangler.h:30
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
Exception for generic error in object insertion procedure.
Definition: InsertionExceptions.h:57
Exception for trying to assign an alias to an alias.
Definition: InsertionExceptions.h:51
Base class for insertion exceptions.
Definition: InsertionExceptions.h:21
MissingAliasedObject(std::string msg="MissingAliasedObject")
Definition: InsertionExceptions.h:47
Exception(std::string msg="Exception")
Definition: InsertionExceptions.h:23
Error(std::string msg="Error")
Definition: InsertionExceptions.h:59
NameAliasClash(std::string msg="NameAliasClash")
Definition: InsertionExceptions.h:35
Definition: Exception.h:24
BadAliasedType(std::string msg="BadAliasedType")
Definition: InsertionExceptions.h:41
Exception for trying to re-assign an alias to an object with a different class.
Definition: InsertionExceptions.h:39