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

Method handleException

src/Server/GRPCServer.cpp:1221–1248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1219 }
1220
1221 void Call::handleException(const Exception & exception)
1222 {
1223 LOG_ERROR(log, "Code: {}, e.displayText() = {}, Stack trace:\n\n{}", exception.code(), exception.displayText(), exception.getStackTraceString());
1224
1225 if (responder && !responder_finished)
1226 {
1227 try
1228 {
1229 /// Try to send logs to client, but it could be risky too.
1230 addLogsToResult();
1231 }
1232 catch (...)
1233 {
1234 LOG_WARNING(log, "Couldn't send logs to client");
1235 }
1236
1237 try
1238 {
1239 sendException(exception);
1240 }
1241 catch (...)
1242 {
1243 LOG_WARNING(log, "Couldn't send exception information to the client");
1244 }
1245 }
1246
1247 close();
1248 }
1249
1250 void Call::onException(const Exception & exception)
1251 {

Callers

nothing calls this directly

Calls 4

closeFunction · 0.85
displayTextMethod · 0.80
getStackTraceStringMethod · 0.80
codeMethod · 0.45

Tested by

no test coverage detected