equal
deleted
inserted
replaced
43 |
43 |
44 int resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR; |
44 int resultCode = CLI::EXIT_CODE_UNEXPECTED_ERROR; |
45 |
45 |
46 try { |
46 try { |
47 CSVCommand command; |
47 CSVCommand command; |
48 command.processDataStream(cout, cin, cli.arguments()); |
48 std::shared_ptr<RelationalWriter> writer(Factory::create(std::cout)); |
|
49 command.process(cin, cli.arguments(), writer); |
49 resultCode = CLI::EXIT_CODE_SUCCESS; |
50 resultCode = CLI::EXIT_CODE_SUCCESS; |
50 } catch (RelpipeWriterException e) { |
51 } catch (RelpipeWriterException e) { |
51 fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str()); |
52 fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str()); |
52 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
53 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
53 resultCode = CLI::EXIT_CODE_DATA_ERROR; |
54 resultCode = CLI::EXIT_CODE_DATA_ERROR; |