src/relpipe-in-csv.cpp
branchv_0
changeset 19 0d858e0eedf8
parent 16 15ee963675af
child 23 1ade50eee150
equal deleted inserted replaced
18:4ed57cf3dcd1 19:0d858e0eedf8
    50 		Configuration configuration = cliParser.parse(cli.arguments());
    50 		Configuration configuration = cliParser.parse(cli.arguments());
    51 		CSVCommand command;
    51 		CSVCommand command;
    52 		std::shared_ptr<RelationalWriter> writer(Factory::create(std::cout));
    52 		std::shared_ptr<RelationalWriter> writer(Factory::create(std::cout));
    53 		command.process(cin, writer, configuration);
    53 		command.process(cin, writer, configuration);
    54 		resultCode = CLI::EXIT_CODE_SUCCESS;
    54 		resultCode = CLI::EXIT_CODE_SUCCESS;
       
    55 	} catch (RelpipeCLIException e) {
       
    56 		fwprintf(stderr, L"Caught CLI exception: %ls\n", e.getMessge().c_str());
       
    57 		fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
       
    58 		resultCode = e.getExitCode();
    55 	} catch (RelpipeWriterException e) {
    59 	} catch (RelpipeWriterException e) {
    56 		fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str());
    60 		fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str());
    57 		fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
    61 		fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount());
    58 		resultCode = CLI::EXIT_CODE_DATA_ERROR;
    62 		resultCode = CLI::EXIT_CODE_DATA_ERROR;
    59 	}
    63 	}