2020-05-16 15:55:18 +02:00
|
|
|
/**
|
|
|
|
* @file ObjectCreationException.hpp
|
|
|
|
* @brief An exception object to handle failed object creations
|
|
|
|
* @author Lauchmelder23
|
|
|
|
* @date 16.05.2020
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <exception>
|
2020-05-18 20:20:00 +02:00
|
|
|
#include <string>
|
2020-05-16 15:55:18 +02:00
|
|
|
|
|
|
|
namespace sdlu
|
|
|
|
{
|
|
|
|
class ObjectCreationException :
|
|
|
|
virtual public std::exception
|
|
|
|
{
|
|
|
|
public:
|
2020-05-18 20:20:00 +02:00
|
|
|
ObjectCreationException(std::string description) :
|
2020-05-16 15:55:18 +02:00
|
|
|
m_pDescription(description)
|
|
|
|
{
|
|
|
|
// Empty
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual const char* what() const throw()
|
|
|
|
{
|
2020-05-18 20:20:00 +02:00
|
|
|
return m_pDescription.c_str();
|
2020-05-16 15:55:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2020-05-18 20:20:00 +02:00
|
|
|
std::string m_pDescription;
|
2020-05-16 15:55:18 +02:00
|
|
|
};
|
|
|
|
}
|