diff -r 9aed8c2ea97d -r 3ab78bf63467 src/relpipe-in-xml.cpp --- a/src/relpipe-in-xml.cpp Thu Jan 10 20:05:13 2019 +0100 +++ b/src/relpipe-in-xml.cpp Fri Jan 11 00:29:32 2019 +0100 @@ -46,10 +46,16 @@ XMLCommand command; command.process(cin, cout); resultCode = CLI::EXIT_CODE_SUCCESS; - } catch (RelpipeWriterException e) { + } catch (RelpipeWriterException& e) { fwprintf(stderr, L"Caught Writer 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 (const xercesc::XMLException& e) { + // TODO: print message + // char* message = xercesc::XMLString::transcode(e.getMessage()); + fwprintf(stderr, L"Caught xercesc::XMLException\n"); + fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); + resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR; } return resultCode;