aboutsummaryrefslogtreecommitdiff
path: root/src/function/transform.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/function/transform.cc')
-rw-r--r--src/function/transform.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/function/transform.cc b/src/function/transform.cc
index 7e8a844..e952018 100644
--- a/src/function/transform.cc
+++ b/src/function/transform.cc
@@ -41,17 +41,16 @@ xercesc::DOMDocument* FunctionTransform::constructDocument(
ResultNodeFacade result(domDocument, rootNode, "result");
result.setAttribute("name", targetPath);
- InputXSLT::TransformationFacade transformation(
- transformationPath,
- this->include_resolver_
- );
-
- InputXSLT::TransformationFacade::return_type errors(
- transformation.generate(targetPath, parameterObject)
- );
+ try {
+ InputXSLT::TransformationFacade transformation(
+ transformationPath,
+ this->include_resolver_
+ );
- if ( errors ) {
- for ( auto&& error : *errors ) {
+ transformation.generate(targetPath, parameterObject);
+ }
+ catch (const ErrorCapacitor::exception& exception) {
+ for ( auto&& error : *(exception.getCachedErrors()) ) {
result.setValueNode("error", error);
}
}