1class NodePropertyError(Exception):
2 """Basic Node attribute error"""
3
4
5class NodeIDAbsentError(NodePropertyError):
6 """Exception throwed if a node's identifier is unknown"""
7
8
9class NodePropertyAbsentError(NodePropertyError):
10 """Exception throwed if a node's data property is not specified"""
11
12
13class MultipleRootError(Exception):
14 """Exception throwed if more than one root exists in a tree."""
15
16
17class DuplicatedNodeIdError(Exception):
18 """Exception throwed if an identifier already exists in a tree."""
19
20
21class LinkPastRootNodeError(Exception):
22 """
23 Exception throwed in Tree.link_past_node() if one attempts
24 to "link past" the root node of a tree.
25 """
26
27
28class InvalidLevelNumber(Exception):
29 pass
30
31
32class LoopError(Exception):
33 """
34 Exception thrown if trying to move node B to node A's position
35 while A is B's ancestor.
36 """