R-Type  2
Doom but in better
Loading...
Searching...
No Matches
NotInitialised.cpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2024
3** rtype (Workspace)
4** File description:
5** NotInitialised.cpp
6*/
7
15
16namespace CustomExceptions
17{
18
19 MusicNotInitialised::MusicNotInitialised(const std::string &exceptionDetail)
20 {
21 _msg = "Error: There is no music to play, please set one by calling ";
22 _msg += "the setMusicPath function from the class.";
23 if (!exceptionDetail.empty()) {
24 _msg += "\n(" + exceptionDetail + ")";
25 }
26 _buffer = _msg.c_str();
27 };
28
30
31 const char *MusicNotInitialised::what() const noexcept
32 {
33 return _buffer;
34 }
35
36}
File in charge of informing the user that the content they tried to access was not initialised.
~MusicNotInitialised()
Destroy the Music Not Initialised object.
const char * what() const noexcept
Retrieves the error message.
MusicNotInitialised(const std::string &exceptionDetail="")
Construct a new Music Not Initialised object.