--- a/src/relpipe-in-filesystem.cpp Wed Jan 16 19:31:37 2019 +0100
+++ b/src/relpipe-in-filesystem.cpp Thu Jan 17 13:14:37 2019 +0100
@@ -28,6 +28,7 @@
#include <relpipe/writer/TypeId.h>
#include <relpipe/cli/CLI.h>
+#include <relpipe/cli/RelpipeCLIException.h>
#include "FilesystemCommand.h"
#include "CLIParser.h"
@@ -53,6 +54,10 @@
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 (RelpipeCLIException e) {
+ fwprintf(stderr, L"Caught CLI 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 = e.getExitCode();
}
return resultCode;