MCPcopy Create free account
hub / github.com/bloomberg/quantum / handleError

Method handleError

quantum/impl/quantum_task_queue_impl.h:471–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469}
470
471inline
472bool TaskQueue::handleError(const WorkItem& workItem)
473{
474 ITaskContinuation::Ptr nextTask;
475 //Check if we have a final task to run
476 nextTask = workItem._task->getErrorHandlerOrFinalTask();
477 //queue next task and de-queue current one
478 enqueue(nextTask);
479 doDequeue(_isIdle, workItem._iter);
480 //Coroutine ended with explicit user error
481 _stats.incErrorCount();
482#ifdef __QUANTUM_PRINT_DEBUG
483 std::lock_guard<std::mutex> guard(Util::LogMutex());
484 if (rc == (int)ITask::RetCode::Exception)
485 {
486 std::cerr << "Coroutine exited with user exception." << std::endl;
487 }
488 else
489 {
490 std::cerr << "Coroutine exited with error : " << rc << std::endl;
491 }
492#endif
493 return false;
494}
495
496inline
497bool TaskQueue::handleException(const WorkItem& workItem, const std::exception* ex)

Callers

nothing calls this directly

Calls 2

incErrorCountMethod · 0.80

Tested by

no test coverage detected