mirror of
https://github.com/edubart/otclient.git
synced 2026-01-11 08:31:29 +01:00
merge total remake
This commit is contained in:
23
src/framework/otml/otmlexception.h
Normal file
23
src/framework/otml/otmlexception.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef OTMLEXCEPTION_H
|
||||
#define OTMLEXCEPTION_H
|
||||
|
||||
#include "otmldeclarations.h"
|
||||
|
||||
/// 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:
|
||||
OTMLException() { }
|
||||
void generateErrorMessage(const OTMLDocumentPtr& doc, const std::string& error, int line);
|
||||
void generateErrorMessage(const OTMLNodePtr& node, const std::string& error);
|
||||
std::string m_what;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user