--- a/src/relpipe-out-xml.cpp Sat Jan 05 18:38:14 2019 +0100
+++ b/src/relpipe-out-xml.cpp Sun Jan 06 22:15:38 2019 +0100
@@ -24,12 +24,14 @@
#include <relpipe/reader/Factory.h>
#include <relpipe/reader/RelationalReader.h>
#include <relpipe/reader/RelpipeReaderException.h>
+#include <relpipe/xmlwriter/RelpipeXMLWriterException.h>
#include "XmlHandler.h"
using namespace relpipe::cli;
using namespace relpipe::reader;
using namespace relpipe::out::xml;
+using namespace relpipe::xmlwriter;
int main(int argc, char** argv) {
setlocale(LC_ALL, "");
@@ -57,6 +59,9 @@
fwprintf(stderr, L"Caught Reader exception: %ls\n", e.getMessge().c_str());
fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
resultCode = CLI::EXIT_CODE_DATA_ERROR;
+ } catch (RelpipeXMLWriterException e) {
+ fwprintf(stderr, L"Error while writing XML: %ls\n", e.getMessge().c_str());
+ resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR;
}
return resultCode;