diff options
Diffstat (limited to 'include/exception.h')
-rw-r--r-- | include/exception.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/include/exception.h b/include/exception.h new file mode 100644 index 0000000..ea328fe --- /dev/null +++ b/include/exception.h @@ -0,0 +1,54 @@ +/** + * Exception.h + * Implementation of Php Exceptions. + * + * @author Jasper van Eck <jasper.vaneck@copernica.com> + * @copyright 2013 Copernica BV + */ + +/** + * Set up namespace + */ +namespace Php { + +/** + * Class definition + */ +class Exception +{ +private: + /** + * The exception message + * @var char* + */ + char* _message; + +public: + /** + * Constructor + * @param string The exception message. + */ + Exception(char* message) throw() + { + _message = message; + } + + /** + * Destructor + */ + ~Exception() throw() + { + } + + /** + * Returns the message of the exception. + * @return std::string + */ + char* getMessage() const throw() + { + return _message; + } + +}; + +} |