50 Configuration configuration = cliParser.parse(cli.arguments()); |
50 Configuration configuration = cliParser.parse(cli.arguments()); |
51 XMLCommand command; |
51 XMLCommand command; |
52 command.process(cin, cout, configuration); |
52 command.process(cin, cout, configuration); |
53 resultCode = CLI::EXIT_CODE_SUCCESS; |
53 resultCode = CLI::EXIT_CODE_SUCCESS; |
54 } catch (RelpipeWriterException& e) { |
54 } catch (RelpipeWriterException& e) { |
55 fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessge().c_str()); |
55 fwprintf(stderr, L"Caught Writer exception: %ls\n", e.getMessage().c_str()); |
56 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
56 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
57 resultCode = CLI::EXIT_CODE_DATA_ERROR; |
57 resultCode = CLI::EXIT_CODE_DATA_ERROR; |
58 } catch (RelpipeCLIException& e) { |
58 } catch (RelpipeCLIException& e) { |
59 fwprintf(stderr, L"Caught CLI exception: %ls\n", e.getMessge().c_str()); |
59 fwprintf(stderr, L"Caught CLI exception: %ls\n", e.getMessage().c_str()); |
60 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
60 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
61 resultCode = e.getExitCode(); |
61 resultCode = e.getExitCode(); |
62 } // TODO: catch xmlpp::exception |
62 } // TODO: catch xmlpp::exception |
63 |
63 |
64 return resultCode; |
64 return resultCode; |