commit | bb5ffac22d66806c55cffc302ccf07f78e1d233c | [log] [tgz] |
---|---|---|
author | numatrumpet <numatrumpet@gmail.com> | Sat Sep 06 22:56:46 2014 +0900 |
committer | numatrumpet <numatrumpet@gmail.com> | Sat Sep 06 22:56:46 2014 +0900 |
tree | 2cceb4a13306fe5fd058c86c9af4d60b2281eec1 | |
parent | fb732f97d48d6dc0ea68a325c47621bd76c46c0d [diff] [blame] |
Using C++11, XMLUtil::ToErrorName(XMLError) returns the name of error type
diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 9e310de..fd9ef16 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp
@@ -476,6 +476,14 @@ return false; } +std::string XMLUtil::ToErrorName( const XMLError errorID ) +{ +#if __cplusplus > 199711LL + return ErrorNames[errorID]; +#else + return std::string("Use C++11 or higher to use this function"); +#endif +} char* XMLDocument::Identify( char* p, XMLNode** node ) {