MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getCurrentExceptionCode

Function getCurrentExceptionCode

src/Common/Exception.cpp:558–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556
557
558int getCurrentExceptionCode()
559{
560 try
561 {
562 throw;
563 }
564 catch (const Exception & e)
565 {
566 return e.code();
567 }
568 catch (const Poco::Exception &)
569 {
570 return ErrorCodes::POCO_EXCEPTION;
571 }
572 catch (const std::exception &)
573 {
574 return ErrorCodes::STD_EXCEPTION;
575 }
576 catch (...) // Ok: return error code for unknown exception types
577 {
578 return ErrorCodes::UNKNOWN_EXCEPTION;
579 }
580}
581
582int getExceptionErrorCode(std::exception_ptr e)
583{

Callers 15

processWithASTFuzzerMethod · 0.85
mainMethod · 0.85
mainEntryClickHouseDisksFunction · 0.85
mainMethod · 0.85
mainMethod · 0.85

Calls 1

codeMethod · 0.45

Tested by

no test coverage detected