R-Type  2
Doom but in better
Loading...
Searching...
No Matches
No.cpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2024
3** rtype (Workspace)
4** File description:
5** No.cpp
6*/
7
15
16namespace CustomExceptions
17{
18
19 NoFlagParameter::NoFlagParameter(const std::string &error)
20 {
21 _msg = "Error: There is no parameter passed to the flag.\n";
22 _msg += "The concerned flag is: ";
23 _msg += error;
24 _buffer = _msg.c_str();
25 };
26
28
29 const char *NoFlagParameter::what() const noexcept
30 {
31 return _buffer;
32 }
33
34 NoWindow::NoWindow(const std::string &exceptionDetail)
35 {
36 _msg = "Error: There is no window on which to render component.";
37 if (!exceptionDetail.empty()) {
38 _msg += "\n(" + exceptionDetail + ")";
39 }
40 _buffer = _msg.c_str();
41 };
42
44
45 const char *NoWindow::what() const noexcept
46 {
47 return _buffer;
48 }
49
50 NoEventManager::NoEventManager(const std::string &exceptionDetail)
51 {
52 _msg = "Error: There is no event manager that can be used to track user inputs.";
53 if (!exceptionDetail.empty()) {
54 _msg += "\n(" + exceptionDetail + ")";
55 }
56 _buffer = _msg.c_str();
57 };
58
60
61 const char *NoEventManager::what() const noexcept
62 {
63 return _buffer;
64 }
65
66 NoSpriteSheet::NoSpriteSheet(const std::string &exceptionDetail)
67 {
68 _msg = "Error: There is no spritesheet set.\n";
69 _msg += "The spritesheet class cannot be called if there is ";
70 _msg += "no spritesheet to display.";
71 if (!exceptionDetail.empty()) {
72 _msg += "\n(" + exceptionDetail + ")";
73 }
74 _buffer = _msg.c_str();
75 };
76
78
79 const char *NoSpriteSheet::what() const noexcept
80 {
81 return _buffer;
82 }
83
84 NoIcon::NoIcon(const std::string &exceptionDetail)
85 {
86 _msg = "Error: There is no icon set.\n";
87 _msg += "The icon class cannot be called if there is ";
88 _msg += "no icon to display.";
89 if (!exceptionDetail.empty()) {
90 _msg += "\n(" + exceptionDetail + ")";
91 }
92 _buffer = _msg.c_str();
93 };
94
96
97 const char *NoIcon::what() const noexcept
98 {
99 return _buffer;
100 }
101
102 NoBackground::NoBackground(const std::string &exceptionDetail)
103 {
104 _msg = "Error: There is no background set.\n";
105 _msg += "The Image component class cannot be called if there is ";
106 _msg += "no background to display.";
107 if (!exceptionDetail.empty()) {
108 _msg += "\n(" + exceptionDetail + ")";
109 }
110 _buffer = _msg.c_str();
111 };
112
114
115 const char *NoBackground::what() const noexcept
116 {
117 return _buffer;
118 }
119
120 NoCollision::NoCollision(const std::string &exceptionDetail)
121 {
122 _msg = "Error: There is no collision set to be called.";
123 if (!exceptionDetail.empty()) {
124 _msg += "\n(" + exceptionDetail + ")";
125 }
126 _buffer = _msg.c_str();
127 };
128
130
131 const char *NoCollision::what() const noexcept
132 {
133 return _buffer;
134 }
135
136 NoAnimation::NoAnimation(const std::string &exceptionDetail)
137 {
138 _msg = "Error: There is no animation set to be used.";
139 if (!exceptionDetail.empty()) {
140 _msg += "\n(" + exceptionDetail + ")";
141 }
142 _buffer = _msg.c_str();
143 };
144
146
147 const char *NoAnimation::what() const noexcept
148 {
149 return _buffer;
150 }
151
152 NoAnimationFrames::NoAnimationFrames(const std::string &exceptionDetail)
153 {
154 _msg = "Error: There are no frames in the animation.";
155 if (!exceptionDetail.empty()) {
156 _msg += "\n(" + exceptionDetail + ")";
157 }
158 _buffer = _msg.c_str();
159 };
160
162
163 const char *NoAnimationFrames::what() const noexcept
164 {
165 return _buffer;
166 }
167
168 NoSprite::NoSprite(const std::string &exceptionDetail)
169 {
170 _msg = "Error: There is no sprite set to be used.";
171 if (!exceptionDetail.empty()) {
172 _msg += "\n(" + exceptionDetail + ")";
173 }
174 _buffer = _msg.c_str();
175 };
176
178
179 const char *NoSprite::what() const noexcept
180 {
181 return _buffer;
182 }
183
184 NoButton::NoButton(const std::string &exceptionDetail)
185 {
186 _msg = "Error: There is no ButtonComponent set to be used.";
187 if (!exceptionDetail.empty()) {
188 _msg += "\n(" + exceptionDetail + ")";
189 }
190 _buffer = _msg.c_str();
191 };
192
194
195 const char *NoButton::what() const noexcept
196 {
197 return _buffer;
198 }
199
200 NoFont::NoFont(const std::string &fontName, const std::string &exceptionDetail)
201 {
202 _msg = "Error: There is no font ";
203 if (!fontName.empty()) {
204 _msg += "called " + fontName + " ";
205 }
206 _msg += "set to be used.";
207 if (!exceptionDetail.empty()) {
208 _msg += "\n(" + exceptionDetail + ")";
209 }
210 _buffer = _msg.c_str();
211 };
212
214
215 const char *NoFont::what() const noexcept
216 {
217 return _buffer;
218 }
219
220 NoColour::NoColour(const std::string &exceptionDetail)
221 {
222 _msg = "Error: There is no colour to be stored or rendered. ";
223 if (!exceptionDetail.empty()) {
224 _msg += "( " + exceptionDetail + ")";
225 }
226 _buffer = _msg.c_str();
227 };
228
230
231 const char *NoColour::what() const noexcept
232 {
233 return _buffer;
234 }
235
236 NoText::NoText(const std::string &errorReason)
237 {
238 _msg = "Error: There is no text component.";
239 if (!errorReason.empty()) {
240 _msg += "\n(" + errorReason + ")";
241 }
242 _buffer = _msg.c_str();
243 };
244
246
247 const char *NoText::what() const noexcept
248 {
249 return _buffer;
250 }
251
252 NoTexture::NoTexture(const std::string &errorReason)
253 {
254 _msg = "Error: There is no texture component.";
255 if (!errorReason.empty()) {
256 _msg += "\n(" + errorReason + ")";
257 }
258 _buffer = _msg.c_str();
259 };
260
262
263 const char *NoTexture::what() const noexcept
264 {
265 return _buffer;
266 }
267
268 NoRenderableText::NoRenderableText(const std::string &errorReason)
269 {
270 _msg = "Error: There is no text instance that can be rendered.";
271 if (!errorReason.empty()) {
272 _msg += "\n(" + errorReason + ")";
273 }
274 _buffer = _msg.c_str();
275 };
276
278
279 const char *NoRenderableText::what() const noexcept
280 {
281 return _buffer;
282 }
283
284 NoRenderableShape::NoRenderableShape(const std::string &errorReason)
285 {
286 _msg = "Error: There is no shape instance that can be rendered.";
287 if (!errorReason.empty()) {
288 _msg += "\n(" + errorReason + ")";
289 }
290 _buffer = _msg.c_str();
291 };
292
294
295 const char *NoRenderableShape::what() const noexcept
296 {
297 return _buffer;
298 }
299
300 NoRenderableImage::NoRenderableImage(const std::string &errorReason)
301 {
302 _msg = "Error: There is no image instance that can be rendered.";
303 if (!errorReason.empty()) {
304 _msg += "\n(" + errorReason + ")";
305 }
306 _buffer = _msg.c_str();
307 };
308
310
311 const char *NoRenderableImage::what() const noexcept
312 {
313 return _buffer;
314 }
315
316 NoRenderableSprite::NoRenderableSprite(const std::string &errorReason)
317 {
318 _msg = "Error: There is no sprite instance that can be rendered.";
319 if (!errorReason.empty()) {
320 _msg += "\n(" + errorReason + ")";
321 }
322 _buffer = _msg.c_str();
323 };
324
326
327 const char *NoRenderableSprite::what() const noexcept
328 {
329 return _buffer;
330 }
331
332 NoRenderableButton::NoRenderableButton(const std::string &errorReason)
333 {
334 _msg = "Error: There is no button instance that can be rendered.";
335 if (!errorReason.empty()) {
336 _msg += "\n(" + errorReason + ")";
337 }
338 _buffer = _msg.c_str();
339 };
340
342
343 const char *NoRenderableButton::what() const noexcept
344 {
345 return _buffer;
346 }
347
349 {
350 _msg = "Error: There is no configuration for the title font in the toml's configuration file ";
351 if (!tomlPath.empty()) {
352 _msg += "path " + tomlPath + " ";
353 }
354 _msg += "that is set to be used.";
355 _buffer = _msg.c_str();
356 };
357
359
360 const char *NoTitleFontConfiguration::what() const noexcept
361 {
362 return _buffer;
363 }
364
366 {
367 _msg = "Error: There is no configuration for the body font in the toml's configuration file ";
368 if (!tomlPath.empty()) {
369 _msg += "path " + tomlPath + " ";
370 }
371 _msg += "that is set to be used.";
372 _buffer = _msg.c_str();
373 };
374
376
377 const char *NoBodyFontConfiguration::what() const noexcept
378 {
379 return _buffer;
380 }
381
383 {
384 _msg = "Error: There is no configuration for the default font in the toml's configuration file ";
385 if (!tomlPath.empty()) {
386 _msg += "path " + tomlPath + " ";
387 }
388 _msg += "that is set to be used.";
389 _buffer = _msg.c_str();
390 };
391
393
394 const char *NoDefaultFontConfiguration::what() const noexcept
395 {
396 return _buffer;
397 }
398
400 {
401 _msg = "Error: There is no configuration for the button font in the toml's configuration file ";
402 if (!tomlPath.empty()) {
403 _msg += "path " + tomlPath + " ";
404 }
405 _msg += "that is set to be used.";
406 _buffer = _msg.c_str();
407 };
408
410
411 const char *NoButtonFontConfiguration::what() const noexcept
412 {
413 return _buffer;
414 }
415
416 NoTOML::NoTOML(const std::string &tomlPath)
417 {
418 _msg = "Error: There is no configuration for the default font in the toml's configuration file ";
419 if (!tomlPath.empty()) {
420 _msg += "path " + tomlPath + " ";
421 }
422 _msg += "that is set to be used.";
423 _buffer = _msg.c_str();
424 };
425
427
428 const char *NoTOML::what() const noexcept
429 {
430 return _buffer;
431 }
432
433 NoTOMLKey::NoTOMLKey(const std::string &tomlPath, const std::string &tomlKey)
434 {
435 _msg = "Error: There is no toml ";
436 if (!tomlKey.empty()) {
437 _msg += "key '" + tomlKey + "'";
438 if (!tomlPath.empty()) {
439 _msg += " in the toml path " + tomlPath + " ";
440 }
441 }
442 _msg += "set to be used.";
443 _buffer = _msg.c_str();
444 };
445
447
448 const char *NoTOMLKey::what() const noexcept
449 {
450 return _buffer;
451 }
452
453 NoSpritesInConfigFile::NoSpritesInConfigFile(const std::string &tomlPath, const std::string &tomlKey)
454 {
455 _msg = "Error: There are no sprites in the provided configuration file.\n";
456 if (!tomlKey.empty()) {
457 _msg += "The key '" + tomlKey + "'";
458 if (!tomlPath.empty()) {
459 _msg += " was not found in the toml file path " + tomlPath + ".";
460 }
461 }
462 _buffer = _msg.c_str();
463 };
464
466
467 const char *NoSpritesInConfigFile::what() const noexcept
468 {
469 return _buffer;
470 }
471
472 NoMusicInConfigFile::NoMusicInConfigFile(const std::string &tomlPath, const std::string &tomlKey)
473 {
474 _msg = "Error: There is no music in the provided configuration file.\n";
475 if (!tomlKey.empty()) {
476 _msg += "The key '" + tomlKey + "'";
477 if (!tomlPath.empty()) {
478 _msg += " was not found in the toml file path " + tomlPath + ".";
479 }
480 }
481 _buffer = _msg.c_str();
482 };
483
485
486 const char *NoMusicInConfigFile::what() const noexcept
487 {
488 return _buffer;
489 }
490
491 NoFontInConfigFile::NoFontInConfigFile(const std::string &tomlPath, const std::string &tomlKey)
492 {
493 _msg = "Error: There are no sprites in the provided configuration file.\n";
494 if (!tomlKey.empty()) {
495 _msg += "The key '" + tomlKey + "'";
496 if (!tomlPath.empty()) {
497 _msg += " was not found in the toml file path " + tomlPath + ".";
498 }
499 }
500 _buffer = _msg.c_str();
501 };
502
504
505 const char *NoFontInConfigFile::what() const noexcept
506 {
507 return _buffer;
508 }
509
510 NoIconInConfigFile::NoIconInConfigFile(const std::string &tomlPath, const std::string &tomlKey)
511 {
512 _msg = "Error: There are no icons in the provided configuration file.\n";
513 if (!tomlKey.empty()) {
514 _msg += "The key '" + tomlKey + "'";
515 if (!tomlPath.empty()) {
516 _msg += " was not found in the toml file path " + tomlPath + ".";
517 }
518 }
519 _buffer = _msg.c_str();
520 };
521
523
524 const char *NoIconInConfigFile::what() const noexcept
525 {
526 return _buffer;
527 }
528
529 NoBackgroundInConfigFile::NoBackgroundInConfigFile(const std::string &tomlPath, const std::string &tomlKey)
530 {
531 _msg = "Error: There are no backgrounds in the provided configuration file.\n";
532 if (!tomlKey.empty()) {
533 _msg += "The key '" + tomlKey + "'";
534 if (!tomlPath.empty()) {
535 _msg += " was not found in the toml file path " + tomlPath + ".";
536 }
537 }
538 _buffer = _msg.c_str();
539 };
540
542
543 const char *NoBackgroundInConfigFile::what() const noexcept
544 {
545 return _buffer;
546 }
547
548 NoActiveNetworkThread::NoActiveNetworkThread(const std::string &exceptionDetails)
549 {
550 _msg = "Error: There is no running network thread to use for the function you called.\n";
551 if (!exceptionDetails.empty()) {
552 _msg += "Additional details: (" + exceptionDetails + ")";
553 }
554 _buffer = _msg.c_str();
555 };
556
558
559 const char *NoActiveNetworkThread::what() const noexcept
560 {
561 return _buffer;
562 }
563
564 NoNetworkClass::NoNetworkClass(const std::string &exceptionDetails)
565 {
566 _msg = "Error: There is no network class to be passed\n";
567 if (!exceptionDetails.empty()) {
568 _msg += "Additional details: (" + exceptionDetails + ")";
569 }
570 _buffer = _msg.c_str();
571 };
572
574
575 const char *NoNetworkClass::what() const noexcept
576 {
577 return _buffer;
578 }
579}
File in charge of informing the user that there isn't the element they tried to access.
NoActiveNetworkThread(const std::string &exceptionDetails="")
Construct a new No Active Network Thread object.
Definition No.cpp:548
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:559
~NoAnimationFrames()
Destroy the No Animation Frames object.
Definition No.cpp:161
NoAnimationFrames(const std::string &exceptionDetail="")
Construct a new No Animation Frames object.
Definition No.cpp:152
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:163
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:147
NoAnimation(const std::string &exceptionDetail="")
Construct a new No Animation object.
Definition No.cpp:136
~NoAnimation()
Destroy the No Animation object.
Definition No.cpp:145
NoBackgroundInConfigFile(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No Background In Config File object.
Definition No.cpp:529
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:543
NoBackground(const std::string &exceptionDetail="")
Construct a new No Sprite Sheet object.
Definition No.cpp:102
~NoBackground()
Destroy the No Sprite Sheet object.
Definition No.cpp:113
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:115
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:377
NoBodyFontConfiguration(const std::string &tomlPath="")
Construct a new No Body Font Configuration object.
Definition No.cpp:365
~NoBodyFontConfiguration()
Destroy the No Body Font Configuration object.
Definition No.cpp:375
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:411
~NoButtonFontConfiguration()
Destroy the No Default Font Configuration object.
Definition No.cpp:409
NoButtonFontConfiguration(const std::string &tomlPath="")
Construct a new No Default Font Configuration object.
Definition No.cpp:399
~NoButton()
Destroy the No Button object.
Definition No.cpp:193
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:195
NoButton(const std::string &exceptionDetail="")
Construct a new No Button object.
Definition No.cpp:184
NoCollision(const std::string &exceptionDetail="")
Construct a new No Collision object.
Definition No.cpp:120
~NoCollision()
Destroy the No Collision object.
Definition No.cpp:129
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:131
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:231
~NoColour()
Destroy the No Colour object.
Definition No.cpp:229
NoColour(const std::string &exceptionDetail="")
Construct a new No Colour object.
Definition No.cpp:220
~NoDefaultFontConfiguration()
Destroy the No Default Font Configuration object.
Definition No.cpp:392
NoDefaultFontConfiguration(const std::string &tomlPath="")
Construct a new No Default Font Configuration object.
Definition No.cpp:382
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:394
~NoEventManager()
Destroy the No Event Manager object.
Definition No.cpp:59
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:61
NoEventManager(const std::string &exceptionDetail="")
Construct a new No Event Manager object.
Definition No.cpp:50
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:29
NoFlagParameter(const std::string &error="")
Construct a new No Flag Parameter object.
Definition No.cpp:19
~NoFlagParameter()
Destroy the No Flag Parameter object.
Definition No.cpp:27
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:505
NoFontInConfigFile(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No Font In Config File object.
Definition No.cpp:491
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:215
~NoFont()
Destroy the No Font object.
Definition No.cpp:213
NoFont(const std::string &fontName="", const std::string &exceptionDetail="")
Construct a new No Font object.
Definition No.cpp:200
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:524
NoIconInConfigFile(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No Icon In Config File object.
Definition No.cpp:510
NoIcon(const std::string &exceptionDetail="")
Construct a new No Sprite Sheet object.
Definition No.cpp:84
~NoIcon()
Destroy the No Sprite Sheet object.
Definition No.cpp:95
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:97
~NoMusicInConfigFile()
Destroy the No Music In Config File object.
Definition No.cpp:484
NoMusicInConfigFile(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No Music In Config File object.
Definition No.cpp:472
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:486
NoNetworkClass(const std::string &exceptionDetails="")
Construct a new No Network Class object.
Definition No.cpp:564
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:575
~NoRenderableButton()
Destroy the No Renderable Button object.
Definition No.cpp:341
NoRenderableButton(const std::string &errorReason="")
Construct a new No Renderable Button object.
Definition No.cpp:332
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:343
NoRenderableImage(const std::string &errorReason="")
Construct a new No Renderable Image object.
Definition No.cpp:300
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:311
~NoRenderableImage()
Destroy the No Renderable Image object.
Definition No.cpp:309
NoRenderableShape(const std::string &errorReason="")
Construct a new No Renderable Shape object.
Definition No.cpp:284
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:295
~NoRenderableShape()
Destroy the No Renderable Shape object.
Definition No.cpp:293
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:327
~NoRenderableSprite()
Destroy the No Renderable Sprite object.
Definition No.cpp:325
NoRenderableSprite(const std::string &errorReason="")
Construct a new No Renderable Sprite object.
Definition No.cpp:316
~NoRenderableText()
Destroy the No Renderable Text object.
Definition No.cpp:277
NoRenderableText(const std::string &errorReason="")
Construct a new No Renderable Text object.
Definition No.cpp:268
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:279
~NoSpriteSheet()
Destroy the No Sprite Sheet object.
Definition No.cpp:77
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:79
NoSpriteSheet(const std::string &exceptionDetail="")
Construct a new No Sprite Sheet object.
Definition No.cpp:66
~NoSprite()
Destroy the No Sprite object.
Definition No.cpp:177
NoSprite(const std::string &exceptionDetail="")
Construct a new No Sprite object.
Definition No.cpp:168
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:179
~NoSpritesInConfigFile()
Destroy the No Sprites In Config File object.
Definition No.cpp:465
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:467
NoSpritesInConfigFile(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No Sprites In Config File object.
Definition No.cpp:453
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:448
~NoTOMLKey()
Destroy the No toml Key object.
Definition No.cpp:446
NoTOMLKey(const std::string &tomlPath="", const std::string &tomlKey="")
Construct a new No toml Key object.
Definition No.cpp:433
NoTOML(const std::string &tomlPath="")
Construct a new No toml object.
Definition No.cpp:416
~NoTOML()
Destroy the No toml object.
Definition No.cpp:426
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:428
~NoText()
Destroy the No Text object.
Definition No.cpp:245
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:247
NoText(const std::string &errorReason="")
Construct a new No Text object.
Definition No.cpp:236
~NoTexture()
Destroy the No Texture object.
Definition No.cpp:261
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:263
NoTexture(const std::string &errorReason="")
Construct a new No Texture object.
Definition No.cpp:252
~NoTitleFontConfiguration()
Destroy the No Title Font Configuration object.
Definition No.cpp:358
NoTitleFontConfiguration(const std::string &tomlPath="")
Construct a new No Title Font Configuration object.
Definition No.cpp:348
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:360
~NoWindow()
Destroy the No Window object.
Definition No.cpp:43
const char * what() const noexcept
Retrieves the error message.
Definition No.cpp:45
NoWindow(const std::string &exceptionDetail="")
Construct a new No Window object.
Definition No.cpp:34