src/relpipe-in-csv.cpp
branchv_0
changeset 19 0d858e0eedf8
parent 16 15ee963675af
child 23 1ade50eee150
--- a/src/relpipe-in-csv.cpp	Sat Oct 24 00:08:17 2020 +0200
+++ b/src/relpipe-in-csv.cpp	Sun Apr 18 10:53:28 2021 +0200
@@ -52,6 +52,10 @@
 		std::shared_ptr<RelationalWriter> writer(Factory::create(std::cout));
 		command.process(cin, writer, configuration);
 		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 (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());