aboutsummaryrefslogtreecommitdiff
path: root/src/support/error_capacitor.cc
AgeCommit message (Collapse)Author
2014-06-05Implemented ErrorMultiplexer as primary error handlerAdrian Kummerländer
* ErrorMultiplexer is derived from both xercesc::ErrorHandler and xalan::ProblemListener * registers itself as XalanTransformer's ErrorHandler and ProblemListener * distributes captured errors and warnings to all registered ErrorMultiplexer::Receiver instances ** ErrorCapacitor implements the ErrorMultiplexer::Receiver interface and as such registers itself in a given ErrorMultiplexer instance ** ErrorMultiplexer reduces the different xalan and xercesc internal error classifications into either warnings or errors * this was implemented to make it possible to easily differentiate between warnings and errors ** previously warnings were treated as errors ** ErrorCapacitor ignores warnings and only captures errors ** WarningCapacitor will be implemented to handle warnings during XSLT processing
2014-06-02Expanded ErrorCapacitor error message generationAdrian Kummerländer
* 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
2014-05-31Using xalan::ProblemListenerBase formatting functionality in ErrorCapacitorAdrian Kummerländer
* xalan::ProblemListenerBase provides a static member method called "defaultFormat" ** this method provides formatting of problem messages into xalan::XalanDOMString instances when combined with xalan::DOMStringPrintWriter * there is no need for implementing custom message formatting ** the only reason why ErrorCapacitor exists is so we are able to capture and print messages at our own volition
2014-05-30Rewrote error handling based on exceptionsAdrian Kummerländer
* ErrorHandler is replaced by ErrorCapacitor ** temporarily registers itself as both the ProblemListener and ErrorHandler of a given XalanTransformer instance ** deregisters itself on destruction ** collects all problems and errors during its lifetime inside a internal std::vector<std::string> instance ** if this instance is not empty it is thrown contained within a ErrorCapacitor::exception by the member method ErrorCapacitor::discharge * this enables using the same code for handling transformation compilation and generation errors and problems * updated test frontend accordingly