src/Error.hh
author terom
Mon, 08 Dec 2008 01:08:00 +0000
changeset 276 87434abc1ba1
parent 227 39cd6861e43e
permissions -rw-r--r--
ability to send NetworkObjectID's via packets, modify Network Projectiles to use this and fix recoil/reloading
#ifndef ERROR_HH
#define ERROR_HH

#include "Logger.hh"

#include <stdexcept>
#include <string>

class Error : public std::exception {
    private:
        const char *message;
    
    public:
        Error (const std::string &message) : message(message.c_str()) { }

        virtual const char* what() const throw() {
            return message;
        }
};

std::ostream& operator<< (std::ostream &s, Error &e);

#endif /* ERROR_HH */