MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / reportError

Method reportError

Libraries/Async/Async.cpp:2159–2182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2157}
2158
2159void SC::AsyncEventLoop::Internal::reportError(AsyncEventLoop& eventLoop, KernelEvents& kernelEvents,
2160 AsyncRequest& async, Result& returnCode, int32_t eventIndex)
2161{
2162 SC_LOG_MESSAGE("{} ERROR {}\n", async.debugName, AsyncRequest::TypeToString(async.type));
2163 if (async.state == AsyncRequest::State::Active)
2164 {
2165 removeActiveHandle(async);
2166 }
2167 if (async.sequence and async.sequence->clearSequenceOnError)
2168 {
2169 clearSequence(*async.sequence);
2170 }
2171 (void)completeAsync(eventLoop, kernelEvents, async, eventIndex, returnCode);
2172 if (not async.isCancelling())
2173 {
2174 if (async.sequence and async.sequence->runningRequest == &async)
2175 {
2176 async.sequence->runningAsync = false;
2177 async.sequence->runningRequest = nullptr;
2178 untrackSequenceIfIdle(*async.sequence);
2179 }
2180 async.markAsFree();
2181 }
2182}
2183
2184SC::Result SC::AsyncEventLoop::Internal::completeAsync(AsyncEventLoop& eventLoop, KernelEvents& kernelEvents,
2185 AsyncRequest& async, int32_t eventIndex, Result& returnCode,

Callers

nothing calls this directly

Calls 3

TypeToStringClass · 0.85
isCancellingMethod · 0.80
markAsFreeMethod · 0.80

Tested by

no test coverage detected