26 lines
471 B
C++
26 lines
471 B
C++
/**
|
|
* @file coreExcept.hpp
|
|
* @author Gustice
|
|
* @brief Template
|
|
*
|
|
* @copyright Copyright (c) 2024
|
|
*/
|
|
#pragma once
|
|
|
|
#include <exception>
|
|
|
|
/**
|
|
* @brief Simple exception
|
|
*/
|
|
class CoreException : public std::exception {
|
|
char const *Text;
|
|
|
|
public:
|
|
/// @brief Constructor with simple pointer to text
|
|
CoreException(char const *text) : Text(text) {
|
|
}
|
|
|
|
/// @brief error message getter
|
|
char const *what() const throw() override { return Text; }
|
|
};
|