MCPcopy Create free account
hub / github.com/ByConity/ByConity / mainEntryClickHouseClient

Function mainEntryClickHouseClient

programs/client/Client.cpp:2895–2919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2893#pragma GCC diagnostic ignored "-Wmissing-declarations"
2894
2895int 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}

Callers 1

mainFunction · 0.85

Calls 6

whatMethod · 0.80
displayTextMethod · 0.80
initMethod · 0.45
runMethod · 0.45
codeMethod · 0.45

Tested by

no test coverage detected