-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExceptions.h
More file actions
44 lines (32 loc) · 873 Bytes
/
Copy pathExceptions.h
File metadata and controls
44 lines (32 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#include <stdexcept>
#include <vector>
#include <string>
#include "Link.h"
namespace tngl {
struct NodeNotCreatableError : std::runtime_error {
std::string nodeName;
NodeNotCreatableError(std::string const& _nodeName, std::string const& msg)
: std::runtime_error(msg)
, nodeName{_nodeName}
{}
};
struct NodeLinksNotSatisfiedError : std::runtime_error {
std::vector<LinkBase*> unsatisfiedLinks;
Node const* node;
NodeLinksNotSatisfiedError(std::vector<LinkBase*> links, Node const* _node, std::string const& msg)
: std::runtime_error(msg)
, unsatisfiedLinks(links)
, node(_node)
{}
};
struct NodeInitializeError : std::runtime_error {
Node const* node;
std::string name;
NodeInitializeError(Node const* _node, std::string const& _name, std::string const& msg)
: std::runtime_error(msg)
, node(_node)
, name(_name)
{}
};
}