-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver_errors.h
More file actions
36 lines (33 loc) · 1.01 KB
/
server_errors.h
File metadata and controls
36 lines (33 loc) · 1.01 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
#ifndef SERVER_ERRORS_H
#define SERVER_ERRORS_H
struct error302 : public std::exception {
[[nodiscard]] const char * what () const throw () {
return "error 302 - zasób tymczasowo przeniesiony";
}
};
struct error400 : public std::exception {
[[nodiscard]] const char * what () const throw () {
return "error 400 - niepoprawny format";
}
};
struct error404 : public std::exception {
[[nodiscard]] const char * what () const throw () {
return "error 404 - zasób nie został odnaleziony";
}
};
struct error500 : public std::exception {
[[nodiscard]] const char * what () throw () {
return "error 500 - błąd po stronie serwera";
}
};
struct error501 : public std::exception {
[[nodiscard]] const char * what () throw () {
return "error 501 - żądanie poza zakresem możliwości serwera";
}
};
struct crlf : public std::exception {
[[nodiscard]] const char * what () const throw () {
return "CR read";
}
};
#endif //SERVER_ERRORS_H