]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkXML.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkXML.h
index ed46960debdd2f447e5bb38a0a9a6bd1f0164fb9..a44508d23ba013120a7e607c071538db68570a20 100644 (file)
@@ -2,7 +2,7 @@
 #define __bbtkXML_h_INCLUDED__
 
 #include "xmlParser.h"
-
+#include <sstream>
 
 namespace bbtk
 {
@@ -25,6 +25,17 @@ namespace bbtk
       }
   }
   //====================================================================
+
+
+  std::string GetErrorMessage(XMLResults* res, const std::string& filename)
+  {
+    std::ostringstream str;
+    str << XMLNode::getError(res->error);
+    str << " [line " << res->nLine << ", col "<<res->nColumn<<"] ";
+    str << " file "<<filename; 
+    return str.str();
+  }
+
 };
 
 #endif