42 ASN1Handler handler(std::cout); |
42 ASN1Handler handler(std::cout); |
43 reader->addHandler(&handler); |
43 reader->addHandler(&handler); |
44 reader->process(); |
44 reader->process(); |
45 resultCode = CLI::EXIT_CODE_SUCCESS; |
45 resultCode = CLI::EXIT_CODE_SUCCESS; |
46 } catch (RelpipeCLIException e) { |
46 } catch (RelpipeCLIException e) { |
47 fwprintf(stderr, L"Caught CLI exception: %ls\n", e.getMessge().c_str()); |
47 fwprintf(stderr, L"Caught CLI exception: %ls\n", e.getMessage().c_str()); |
48 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
48 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
49 resultCode = e.getExitCode(); |
49 resultCode = e.getExitCode(); |
50 } catch (RelpipeReaderException e) { |
50 } catch (RelpipeReaderException e) { |
51 fwprintf(stderr, L"Caught Reader exception: %ls\n", e.getMessge().c_str()); |
51 fwprintf(stderr, L"Caught Reader exception: %ls\n", e.getMessage().c_str()); |
52 fwprintf(stderr, L"Debug: Input stream: eof=%ls, lastRead=%d\n", (cin.eof() ? L"true" : L"false"), cin.gcount()); |
52 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; |
53 resultCode = CLI::EXIT_CODE_DATA_ERROR; |
54 } |
54 } |
55 |
55 |
56 return resultCode; |
56 return resultCode; |