--- a/src/relpipe-in-jack.cpp Tue Oct 06 16:55:22 2020 +0200
+++ b/src/relpipe-in-jack.cpp Wed Oct 07 01:45:30 2020 +0200
@@ -40,7 +40,6 @@
setlocale(LC_ALL, "");
CLI::untieStdIO();
CLI cli(argc, argv);
- // TODO: options, CLI parsing, configurable attributes
int resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR;
try {
@@ -52,6 +51,10 @@
std::shared_ptr<RelationalWriter> writer(Factory::create(std::cout));
jackCommand->processJackStream(writer, std::bind(fflush, stdout)); // std::bind(fflush, XXX) Factory::create(XXX) must be the same stream XXX
resultCode = CLI::EXIT_CODE_SUCCESS;
+ } 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();
} catch (JackException e) {
fwprintf(stderr, L"Caught JACK 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());