-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathServerExceptions.hpp
More file actions
54 lines (51 loc) · 1 KB
/
Copy pathServerExceptions.hpp
File metadata and controls
54 lines (51 loc) · 1 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
#pragma once
#include <exception>
class SocketCreationError : public std::exception {
public:
const char *what() const throw()
{
return("Cannot create the socket");
}
};
class SocketBindingError : public std::exception {
public:
const char *what() const throw()
{
return("Cannot bind the socket");
}
};
class SocketListenError : public std::exception {
public:
const char *what() const throw()
{
return("Cannot listen");
}
};
class SelectCallError : public std::exception {
public:
const char *what() const throw()
{
return("Cannot call select()");
}
};
class SessionCreationError : public std::exception {
public:
const char *what() const throw()
{
return("Cannot create a session");
}
};
class DuplicatedSessionFd : public std::exception {
public:
const char *what() const throw()
{
return("Duplicate session fd or a ghost session");
}
};
class BotCreationFail : public std::exception {
public:
const char *what() const throw()
{
return("Bot connection to the serv. fail");
}
};