[geos-commits] r3268 - trunk/tests/xmltester
svn_geos at osgeo.org
svn_geos at osgeo.org
Fri Mar 11 09:24:29 EST 2011
Author: strk
Date: 2011-03-11 06:24:28 -0800 (Fri, 11 Mar 2011)
New Revision: 3268
Modified:
trunk/tests/xmltester/XMLTester.cpp
Log:
Tell more about XML loading failures
Modified: trunk/tests/xmltester/XMLTester.cpp
===================================================================
--- trunk/tests/xmltester/XMLTester.cpp 2011-03-08 09:04:01 UTC (rev 3267)
+++ trunk/tests/xmltester/XMLTester.cpp 2011-03-11 14:24:28 UTC (rev 3268)
@@ -384,7 +384,9 @@
if ( ! xml.LoadFile(source.c_str()) )
{
- std::cerr << "Error loading " << source << std::endl;
+ std::stringstream err;
+ err << "Could not load " << source << ": " << xml.ErrorDesc();
+ throw runtime_error(err.str());
}
//dump_to_stdout(&xml);
@@ -1500,7 +1502,12 @@
}
std::string source = argV[i];
- tester.run(source);
+
+ try {
+ tester.run(source);
+ } catch (const std::exception& exc) {
+ std::cerr<<exc.what()<<std::endl;
+ }
}
if ( ! sql_output ) tester.resultSummary(std::cout);
More information about the geos-commits
mailing list