2011-08-14 04:09:11 +02:00
|
|
|
#ifndef OTMLEXCEPTION_H
|
|
|
|
#define OTMLEXCEPTION_H
|
|
|
|
|
2011-08-15 16:06:15 +02:00
|
|
|
#include "declarations.h"
|
2011-08-14 04:09:11 +02:00
|
|
|
|
|
|
|
/// All OTML errors throw this exception
|
|
|
|
class OTMLException : public std::exception
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
OTMLException(const OTMLNodePtr& node, const std::string& error);
|
|
|
|
OTMLException(const OTMLDocumentPtr& doc, const std::string& error, int line = -1);
|
|
|
|
virtual ~OTMLException() throw() { };
|
|
|
|
|
|
|
|
virtual const char* what() const throw() { return m_what.c_str(); }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
std::string m_what;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|