dfhack/depends/tinyxml/tinyxmlerror.cpp

53 lines
1.7 KiB
C++

2009-09-13 18:02:46 -06:00
/*
www.sourceforge.net/projects/tinyxml
Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
#include "tinyxml.h"
// The goal of the seperate error file is to make the first
// step towards localization. tinyxml (currently) only supports
// english error messages, but the could now be translated.
//
// It also cleans up the code a bit.
//
Update bundled tinyxml version from 2.5.3 to 2.6.2 Upstream has moved onto tinyxml2, so this is likely to be the last release of the original tinyxml (2.6.2 came out in 2011). dfhack should therefore probably ship 2.6.2, since it's unlikely there will ever be future fixes to this code. The upstream changelog (taken from "changes.txt" in upstream tarball) contains many bugfixes and is included in the commit message below. 2.5.4 - A TiXMLDocument can't be a sub-node. Block this from happening in the 'replace'. Thanks Noam. - [ 1714831 ] TiXmlBase::location is not copied by copy-ctors, fix reported and suggested by Nicola Civran. - Fixed possible memory overrun in the comment reading code - thanks gcarlton77 2.5.5 - Alex van der Wal spotted incorrect types (lf) being used in print and scan. robertnestor pointed out some problems with the simple solution. Types updated. - Johannes Hillert pointed out some bug typos. - Christian Mueller identified inconsistent error handling with Attributes. - olivier barthelemy also reported a problem with double truncation, also related to the %lf issue. - zaelsius came up with a great (and simple) suggestion to fix QueryValueAttribute truncating strings. - added some null pointer checks suggested by hansenk - Sami V�is�nen found a (rare) buffer overrun that could occur in parsing. - vi tri filed a bug that led to a refactoring of the attribute setting mess (as well as adding a missing SetDoubleAttribute() ) - removed TIXML_ERROR_OUT_OF_MEMORY. TinyXML does not systematically address OOO, and the notion it does is misleading. - vanneto, keithmarshall, others all reported the warning from IsWhiteSpace() usage. Cleaned this up - many thanks to everyone who reported this one. - tibur found a bug in end tag parsing 2.6.2 - Switched over to VC 2010 - Fixed up all the build issues arising from that. (Lots of latent build problems.) - Removed the old, now unmaintained and likely not working, build files. - Fixed some static analysis issues reported by orbitcowboy from cppcheck. - Bayard 95 sent in analysis from a different analyzer - fixes applied from that as well. - Tim Kosse sent a patch fixing an infinite loop. - Ma Anguo identified a doc issue. - Eddie Cohen identified a missing qualifier resulting in a compilation error on some systems. - Fixed a line ending bug. (What year is this? Can we all agree on a format for text files? Please? ...oh well.)
2016-12-06 19:40:30 -07:00
const char* TiXmlBase::errorString[ TiXmlBase::TIXML_ERROR_STRING_COUNT ] =
2009-09-13 18:02:46 -06:00
{
"No error",
"Error",
"Failed to open file",
"Error parsing Element.",
"Failed to read Element name",
"Error reading Element value.",
"Error reading Attributes.",
"Error: empty tag.",
"Error reading end tag.",
"Error parsing Unknown.",
"Error parsing Comment.",
"Error parsing Declaration.",
"Error document empty.",
"Error null (0) or unexpected EOF found in input stream.",
"Error parsing CDATA.",
"Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.",
};