2018-09-05 15:47:09 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
// TODO: This MUST be changed to something less generic
|
2018-09-10 15:35:02 +00:00
|
|
|
#define EXCEPTION(message) Exception(message, __FILE__, __LINE__)
|
2018-09-05 15:47:09 +00:00
|
|
|
|
|
|
|
class Exception
|
|
|
|
{
|
|
|
|
public:
|
2018-09-10 15:35:02 +00:00
|
|
|
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-05 15:47:09 +00:00
|
|
|
|
2018-09-10 15:35:02 +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-05 15:47:09 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string m_message;
|
2018-09-10 15:35:02 +00:00
|
|
|
std::string m_file_name;
|
|
|
|
int m_line;
|
2018-09-05 15:47:09 +00:00
|
|
|
};
|