merge total remake

This commit is contained in:
Eduardo Bart
2011-08-13 23:09:11 -03:00
parent 0af7856475
commit 55862b07ad
253 changed files with 6777 additions and 8463 deletions

View File

@@ -0,0 +1,25 @@
#include "otmlexception.h"
#include "otmldocument.h"
OTMLException::OTMLException(const OTMLNodePtr& node, const std::string& error)
{
std::stringstream ss;
ss << "OTML error";
if(!node->source().empty())
ss << " in '" << node->source() << "'";
ss << ": " << error;
m_what = ss.str();
}
OTMLException::OTMLException(const OTMLDocumentPtr& doc, const std::string& error, int line)
{
std::stringstream ss;
ss << "OTML error";
if(doc && !doc->source().empty()) {
ss << " in '" << doc->source() << "'";
if(line >= 0)
ss << " at line " << line;
}
ss << ": " << error;
m_what = ss.str();
}