src/proto2/Error.hh
author nireco
Mon, 24 Nov 2008 21:38:04 +0000
changeset 101 1c52bd7fbc43
parent 89 825c4613e087
permissions -rw-r--r--
dot production vec*scalar
#ifndef ERROR_HH
#define ERROR_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;
        }
};

#endif /* ERROR_HH */