src/Error.hh
author terom
Tue, 09 Dec 2008 02:00:19 +0000
changeset 344 a1ac08c37f0f
parent 227 39cd6861e43e
permissions -rw-r--r--
reorganize section 1 of documentation, and write a lot of really hard-to-read text in section 2
#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 */