From 53184edc79963516a4c3579b51fa0d126bf8d90d Mon Sep 17 00:00:00 2001 From: Jez Higgins Date: Sun, 19 Dec 2010 22:44:06 +0000 Subject: [PATCH] better error handling when loading docs --- tests/DOM/dom_conf_test.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/DOM/dom_conf_test.hpp b/tests/DOM/dom_conf_test.hpp index b6777677..d51986b6 100644 --- a/tests/DOM/dom_conf_test.hpp +++ b/tests/DOM/dom_conf_test.hpp @@ -53,11 +53,13 @@ protected: Arabica::SAX::InputSource is(SA::construct_from_utf8(filename.c_str())); Arabica::SAX2DOM::Parser parser; + Arabica::SAX::CatchErrorHandler eh; + parser.setErrorHandler(eh); parser.parse(is); Document d = parser.getDocument(); if(d == 0) - assertImplementation(false, "Could not load", -1, filename); + assertImplementation(false, "Could not load : " + eh.errors(), -1, filename); //d.normalize(); return d;