charcoal/OpenGLEngine/Exception.h

26 lines
590 B
C
Raw Normal View History

#pragma once
#include <string>
// TODO: This MUST be changed to something less generic
#define EXCEPTION(message) Exception(message, __FILE__, __LINE__)
2018-09-12 21:03:46 +00:00
namespace charcoal
{
2018-09-12 21:03:46 +00:00
class Exception
{
public:
Exception(const std::string& message, const std::string& file_name, int line)
: m_message(message), m_file_name(file_name), m_line(line)
{}
2018-09-12 21:03:46 +00:00
const std::string& get_message() { return m_message; }
const std::string& get_file_name() { return m_file_name; }
int get_line() { return m_line; }
2018-09-12 21:03:46 +00:00
private:
std::string m_message;
std::string m_file_name;
int m_line;
};
}