src/Error.hh
author nireco
Sat, 31 Jan 2009 12:33:08 +0200
changeset 443 5d1119729f58
parent 227 39cd6861e43e
permissions -rw-r--r--
worm02 two pics to comment
#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 */