| 2893 | #pragma GCC diagnostic ignored "-Wmissing-declarations" |
| 2894 | |
| 2895 | int mainEntryClickHouseClient(int argc, char ** argv) |
| 2896 | { |
| 2897 | try |
| 2898 | { |
| 2899 | DB::Client client; |
| 2900 | client.init(argc, argv); |
| 2901 | return client.run(); |
| 2902 | } |
| 2903 | catch (const boost::program_options::error & e) |
| 2904 | { |
| 2905 | std::cerr << "Bad arguments: " << e.what() << std::endl; |
| 2906 | return 1; |
| 2907 | } |
| 2908 | catch (const DB::Exception & e) |
| 2909 | { |
| 2910 | std::string text = e.displayText(); |
| 2911 | std::cerr << "Code: " << e.code() << ". " << text << std::endl; |
| 2912 | return 1; |
| 2913 | } |
| 2914 | catch (...) |
| 2915 | { |
| 2916 | std::cerr << DB::getCurrentExceptionMessage(true) << std::endl; |
| 2917 | return 1; |
| 2918 | } |
| 2919 | } |
no test coverage detected