From a3db5268c42aca330a1144c13b034113647e4d8d Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Sat, 20 Oct 2012 11:05:27 +0200 Subject: [PATCH] include position in XML parse error message --- gdal/ogr/ogrsf_frmts/gml/gmlhandler.cpp | 4 ++-- gdal/ogr/ogrsf_frmts/nas/nashandler.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gdal/ogr/ogrsf_frmts/gml/gmlhandler.cpp b/gdal/ogr/ogrsf_frmts/gml/gmlhandler.cpp index fff78a3143b3..ee863671223d 100644 --- a/gdal/ogr/ogrsf_frmts/gml/gmlhandler.cpp +++ b/gdal/ogr/ogrsf_frmts/gml/gmlhandler.cpp @@ -135,8 +135,8 @@ void GMLXercesHandler::fatalError( const SAXParseException &exception) pszErrorMessage = tr_strdup( exception.getMessage() ); CPLError( CE_Failure, CPLE_AppDefined, - "XML Parsing Error: %s\n", - pszErrorMessage ); + "XML Parsing Error: %s at line %d, column %d\n", + pszErrorMessage, exception.getLineNumber(), exception.getColumnNumber() ); CPLFree( pszErrorMessage ); } diff --git a/gdal/ogr/ogrsf_frmts/nas/nashandler.cpp b/gdal/ogr/ogrsf_frmts/nas/nashandler.cpp index 544bb1e5bb39..fe720e579bd0 100644 --- a/gdal/ogr/ogrsf_frmts/nas/nashandler.cpp +++ b/gdal/ogr/ogrsf_frmts/nas/nashandler.cpp @@ -604,8 +604,8 @@ void NASHandler::fatalError( const SAXParseException &exception) pszErrorMessage = tr_strdup( exception.getMessage() ); CPLError( CE_Failure, CPLE_AppDefined, - "XML Parsing Error: %s\n", - pszErrorMessage ); + "XML Parsing Error: %s at line %d, column %d\n", + pszErrorMessage, exception.getLineNumber(), exception.getColumnNumber() ); CPLFree( pszErrorMessage ); }