| 6 | #include <stdexcept> |
| 7 | |
| 8 | int main(int argc, char **argv) try { |
| 9 | auto output = cmkr::args::handle_args(argc, argv); |
| 10 | auto format = "[cmkr] %s\n"; |
| 11 | if (strchr(output, '\n') != nullptr) |
| 12 | format = "%s\n"; |
| 13 | (void)fprintf(stderr, format, output); |
| 14 | return EXIT_SUCCESS; |
| 15 | } catch (const std::exception &e) { |
| 16 | auto format = "[cmkr] error: %s\n"; |
| 17 | if (strchr(e.what(), '\n') != nullptr) |
| 18 | format = "%s\n"; |
| 19 | (void)fprintf(stderr, format, e.what()); |
| 20 | return EXIT_FAILURE; |
| 21 | } |
nothing calls this directly
no test coverage detected