[open-ils-commits] r8038 - trunk/Open-ILS/src/apachemods
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 8 09:47:49 EST 2007
Author: erickson
Date: 2007-11-08 09:31:59 -0500 (Thu, 08 Nov 2007)
New Revision: 8038
Modified:
trunk/Open-ILS/src/apachemods/mod_xmlent.c
Log:
additionally logging filename and XML content on parse failures
Modified: trunk/Open-ILS/src/apachemods/mod_xmlent.c
===================================================================
--- trunk/Open-ILS/src/apachemods/mod_xmlent.c 2007-11-08 14:28:32 UTC (rev 8037)
+++ trunk/Open-ILS/src/apachemods/mod_xmlent.c 2007-11-08 14:31:59 UTC (rev 8038)
@@ -339,10 +339,15 @@
/* push data into the XML push parser */
if ( XML_Parse(ctx->parser, data, len, 0) == XML_STATUS_ERROR ) {
+ char tmp[len+1];
+ memcpy(tmp, data, len);
+ tmp[len] = '\0';
+
/* log and die on XML errors */
- ap_log_rerror( APLOG_MARK, APLOG_ERR, 0, f->r, "XMLENT XML Parse Error: %s at line %d\n",
+ ap_log_rerror( APLOG_MARK, APLOG_ERR, 0, f->r,
+ "XMLENT XML Parse Error: %s at line %d: parsing %s: data %s",
XML_ErrorString(XML_GetErrorCode(ctx->parser)),
- (int) XML_GetCurrentLineNumber(ctx->parser));
+ (int) XML_GetCurrentLineNumber(ctx->parser), f->r->filename, tmp);
XML_ParserFree(parser);
parser = NULL;
More information about the open-ils-commits
mailing list