R-Type  2
Doom but in better
Loading...
Searching...
No Matches
Failed.cpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2024
3** rtype (Workspace)
4** File description:
5** Failed.cpp
6*/
7
15
16namespace CustomExceptions
17{
18
19 ConnectionFailed::ConnectionFailed(const std::string &address)
20 {
21 _msg = "Error: The provided address is unreachable.\n";
22 _msg += "The address was: '";
23 _msg += address;
24 _msg += "'.";
25 _buffer = _msg.c_str();
26 };
27
29
30 const char *ConnectionFailed::what() const noexcept
31 {
32 return _buffer;
33 }
34
35}
File in charge of storing the exceptions concerning failed attempts.
const char * what() const noexcept
Retrieves the error message.
Definition Failed.cpp:30
~ConnectionFailed()
Destroy the Connection Failed object.
Definition Failed.cpp:28
ConnectionFailed(const std::string &address="")
Construct a new Connection Failed object.
Definition Failed.cpp:19