src/relpipe-in-csv.cpp
branchv_0
changeset 15 157bb1d5e08a
parent 14 012d491e219a
child 16 15ee963675af
equal deleted inserted replaced
14:012d491e219a 15:157bb1d5e08a
    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;