src/relpipe-out-mqtt.cpp
branchv_0
changeset 3 62ced7c41c67
parent 0 7ef5ce9477c8
equal deleted inserted replaced
2:1a0fbd17db13 3:62ced7c41c67
    42 
    42 
    43 	try {
    43 	try {
    44 		CLIParser cliParser;
    44 		CLIParser cliParser;
    45 		Configuration configuration = cliParser.parse(cli.arguments());
    45 		Configuration configuration = cliParser.parse(cli.arguments());
    46 		std::shared_ptr<RelationalReader> reader(Factory::create(std::cin));
    46 		std::shared_ptr<RelationalReader> reader(Factory::create(std::cin));
    47 		MQTTHandler handler(configuration);
    47 		std::shared_ptr<MQTTHandler> handler(MQTTHandler::create(configuration));
    48 		reader->addHandler(&handler);
    48 		reader->addHandler(handler.get());
    49 		reader->process();
    49 		reader->process();
    50 		resultCode = CLI::EXIT_CODE_SUCCESS;
    50 		resultCode = CLI::EXIT_CODE_SUCCESS;
    51 	} catch (RelpipeCLIException e) {
    51 	} catch (RelpipeCLIException e) {
    52 		fwprintf(stderr, L"Caught CLI exception: %ls\n", e.getMessage().c_str());
    52 		fwprintf(stderr, L"Caught CLI exception: %ls\n", e.getMessage().c_str());
    53 		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());