Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
exception.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #ifndef BLAM
6 #define BLAM
7 #endif
8 
13 {
14  Generic,
18 };
19 
27 {
28 private:
30  std::string message = "";
31 
32 public:
39  BlamException(BlamExceptionType _type, std::string _message);
40 
46  BlamException(std::string _message);
47 
54 
60  std::string GetExceptionMessage();
61 };
62 
70 {
71 public:
77  BlamAccessViolationException(std::string _message);
78 };
79 
87 {
88 public:
94  BlamArithmeticErrorException(std::string _message);
95 };
96 
104 {
105 public:
111  BlamIllegalInstructionException(std::string _message);
112 };
BlamException::GetType
BlamExceptionType GetType()
Retrieves the type of the exception.
Definition: BlamException.cpp:14
BlamExceptionType::Generic
@ Generic
A generic exception with no additional details.
BlamArithmeticErrorException::BlamArithmeticErrorException
BlamArithmeticErrorException(std::string _message)
Constructs a new arithmetic error exception.
Definition: BlamArithmeticErrorException.cpp:3
BlamAccessViolationException
Class representing an access violation exception.
Definition: exception.h:69
BlamAccessViolationException::BlamAccessViolationException
BlamAccessViolationException(std::string _message)
Constructs a new access violation exception.
Definition: BlamAccessViolationException.cpp:3
BlamException::BlamException
BlamException(BlamExceptionType _type, std::string _message)
Constructs a new Blamite exception.
Definition: BlamException.cpp:3
BlamExceptionType
BlamExceptionType
Enumerator listing all possible Blamite exceptions.
Definition: exception.h:12
BlamException::GetExceptionMessage
std::string GetExceptionMessage()
Retrieves the message describing the exception.
Definition: BlamException.cpp:19
BlamExceptionType::AccessViolation
@ AccessViolation
A file or memory access violation. Fired when a SIGSEGV signal is received.
BlamArithmeticErrorException
Class representing an arithmetic error exception.
Definition: exception.h:86
BlamIllegalInstructionException::BlamIllegalInstructionException
BlamIllegalInstructionException(std::string _message)
Constructs a new illegal instruction exception.
Definition: BlamIllegalInstructionException.cpp:3
BlamIllegalInstructionException
Class representing an illegal instruction exception.
Definition: exception.h:103
BlamExceptionType::ArithmeticError
@ ArithmeticError
An arithmetic error, such as a divide by zero error. Fired when a SIGFPE signal is received.
BlamExceptionType::IllegalInstruction
@ IllegalInstruction
An illegal instruction error. Fired when a SIGILL signal is received.
BlamException
Class representing a custom Blamite exception.
Definition: exception.h:26