| 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 | { |
nothing calls this directly
no test coverage detected