49 reader->process(); |
49 reader->process(); |
50 |
50 |
51 resultCode = CLI::EXIT_CODE_SUCCESS; |
51 resultCode = CLI::EXIT_CODE_SUCCESS; |
52 |
52 |
53 } catch (RelpipeCLIException e) { |
53 } catch (RelpipeCLIException e) { |
54 fwprintf(stderr, L"Caught CLI exception: %ls\n", e.getMessge().c_str()); |
54 fwprintf(stderr, L"Caught CLI exception: %ls\n", e.getMessage().c_str()); |
55 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
55 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
56 resultCode = e.getExitCode(); |
56 resultCode = e.getExitCode(); |
57 } catch (RelpipeReaderException e) { |
57 } catch (RelpipeReaderException e) { |
58 fwprintf(stderr, L"Caught Reader exception: %ls\n", e.getMessge().c_str()); |
58 fwprintf(stderr, L"Caught Reader exception: %ls\n", e.getMessage().c_str()); |
59 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
59 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
60 resultCode = CLI::EXIT_CODE_DATA_ERROR; |
60 resultCode = CLI::EXIT_CODE_DATA_ERROR; |
61 } catch (RelpipeCSVWriterException e) { |
61 } catch (RelpipeCSVWriterException e) { |
62 fwprintf(stderr, L"Error while generating CSV: %ls\n", e.getMessge().c_str()); |
62 fwprintf(stderr, L"Error while generating CSV: %ls\n", e.getMessage().c_str()); |
63 resultCode = CLI::EXIT_CODE_DATA_ERROR; |
63 resultCode = CLI::EXIT_CODE_DATA_ERROR; |
64 } |
64 } |
65 |
65 |
66 return resultCode; |
66 return resultCode; |
67 } |
67 } |