-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHWExceptions.h
More file actions
64 lines (54 loc) · 1.57 KB
/
HWExceptions.h
File metadata and controls
64 lines (54 loc) · 1.57 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef HWEXCEPTIONS_H
#define HWEXCEPTIONS_H
#include <exception>
#include <string>
class ExistingBranchInsertError : public std::exception {
public:
const char* what() const throw() {
return "Trying to add a branch with an already existing location";
}
};
class NonExistingBranchRemoveError : public std::exception {
public:
const char* what() const throw() {
return "Trying to remove a branch with a non existing location";
}
};
class NonExistingBranchRetrieveError : public std::exception {
public:
const char* what() const throw() {
return "Trying to retrieve a branch with a non existing location";
}
};
class ExistingItemError : public std::exception {
public:
const char* what() const throw() {
return "Trying to add an item with an id already in the catalog";
}
};
class FullCatalogError : public std::exception {
public:
const char* what() const throw() {
return "Trying to add an item to a full catalog";
}
};
class NonExistingItemError : public std::exception {
public:
const char* what() const throw() {
return "Trying to remove an item with a non existing id";
}
};
class NoneExistingItemTypeError : public std::exception {
public:
const char* what() const throw() {
return "Trying to get an item with a non existing type";
}
};
class ConnectError : public std::exception {
public:
const char* what() const throw() {
return "Failed connection attempt";
}
};
#endif // HWEXCEPTIONS_H
#pragma once