Inherited from standard exception.

This commit is contained in:
Guillaume Melquiond 2010-07-31 10:52:12 +00:00
parent dae2763b00
commit 1868c2c4b5

View file

@ -15,17 +15,26 @@
#ifndef GAME_ERRORS_HPP_INCLUDED
#define GAME_ERRORS_HPP_INCLUDED
#include <exception>
#include <string>
namespace game {
struct error {
struct error : std::exception
{
std::string message;
error() :
message()
{}
error(const std::string& msg) : message(msg)
{}
~error() throw() {}
std::string message;
const char *what() const throw()
{
return message.c_str();
}
};
struct mp_server_error : public error {