aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerländer2014-06-02 22:28:39 +0200
committerAdrian Kummerländer2014-06-02 22:28:39 +0200
commit533ebc587ee2b4e8e3c77b8ecd10056670483754 (patch)
treebdc326c17442e07afb92024c148dc894b4abeeea
parent6b5da054693cd348f3c357dbf1c8cb1979fecf6a (diff)
downloadInputXSLT-533ebc587ee2b4e8e3c77b8ecd10056670483754.tar
InputXSLT-533ebc587ee2b4e8e3c77b8ecd10056670483754.tar.gz
InputXSLT-533ebc587ee2b4e8e3c77b8ecd10056670483754.tar.bz2
InputXSLT-533ebc587ee2b4e8e3c77b8ecd10056670483754.tar.lz
InputXSLT-533ebc587ee2b4e8e3c77b8ecd10056670483754.tar.xz
InputXSLT-533ebc587ee2b4e8e3c77b8ecd10056670483754.tar.zst
InputXSLT-533ebc587ee2b4e8e3c77b8ecd10056670483754.zip
Expanded ErrorCapacitor error message generation
* added entity, line and column information * formatting analog to ErrorCapacitor warning messages ** i.e. this commit implements functionality similar to "xalanc::ProblemListenerBase::defaultFormat" for "xercesc::ErrorHandler" exceptions
-rw-r--r--src/support/error_capacitor.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/support/error_capacitor.cc b/src/support/error_capacitor.cc
index 1a536ed..e624cd1 100644
--- a/src/support/error_capacitor.cc
+++ b/src/support/error_capacitor.cc
@@ -11,9 +11,18 @@
namespace {
+using InputXSLT::XercesStringGuard;
+
inline std::string getMessage(const xercesc::SAXParseException& exception) {
- return std::string(
- *InputXSLT::XercesStringGuard<char>(exception.getMessage())
+ return (
+ std::string(*XercesStringGuard<char>(exception.getMessage()))
+ + ". (Occurred in entity '"
+ + std::string(*XercesStringGuard<char>(exception.getSystemId()))
+ + "', at line "
+ + std::to_string(exception.getLineNumber())
+ + ", column "
+ + std::to_string(exception.getColumnNumber())
+ + ".)"
);
}