src/relpipe-in-jack.cpp
branchv_0
changeset 11 07247893054e
parent 8 8ef1980db907
child 20 b6dd93370d8c
--- 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());