add specialized exception type for bad graphs

This commit is contained in:
wmayer
2018-11-26 14:15:19 +01:00
parent 88a35a05bb
commit 1647eee92c
5 changed files with 45 additions and 5 deletions

View File

@@ -634,6 +634,28 @@ RuntimeError::RuntimeError(const RuntimeError &inst)
// ---------------------------------------------------------
BadGraphError::BadGraphError()
: RuntimeError("The graph must be a DAG.")
{
}
BadGraphError::BadGraphError(const char * sMessage)
: RuntimeError(sMessage)
{
}
BadGraphError::BadGraphError(const std::string& sMessage)
: RuntimeError(sMessage)
{
}
BadGraphError::BadGraphError(const BadGraphError &inst)
: RuntimeError(inst)
{
}
// ---------------------------------------------------------
NotImplementedError::NotImplementedError()
: Exception()
{