diff options
Diffstat (limited to 'src/transformation_facade.cc')
-rw-r--r-- | src/transformation_facade.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/transformation_facade.cc b/src/transformation_facade.cc index 19f7772..38dfe93 100644 --- a/src/transformation_facade.cc +++ b/src/transformation_facade.cc @@ -4,6 +4,7 @@ #include <xalanc/XalanTransformer/XalanCompiledStylesheet.hpp> #include <sstream> +#include <iostream> #include "function/read_file.h" #include "function/read_xml_file.h" @@ -54,11 +55,17 @@ int TransformationFacade::generate(const std::string& target) { xalan::XSLTInputSource inputSource(emptyStream); xalan::XSLTResultTarget outputTarget(target.data()); - return this->transformer_.transform( + const int resultCode = this->transformer_.transform( inputSource, this->transformation_, outputTarget ); + + if ( resultCode != 0 ) { + std::cerr << this->transformer_.getLastError() << std::endl; + } + + return resultCode; } } |