MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / handleAutoRunLoopUnhandledError

Function handleAutoRunLoopUnhandledError

background/auto-run-controller.js:221–238  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

219 }
220
221 async function handleAutoRunLoopUnhandledError(error) {
222 const currentRuntime = runtime.get();
223 console.error('Auto run loop crashed:', error);
224 if (!isStopError(error)) {
225 await addLog(`自动运行异常终止:${getErrorMessage(error) || '未知错误'}`, 'error');
226 }
227
228 runtime.set({ autoRunActive: false });
229 await broadcastAutoRunStatus('stopped', {
230 currentRun: currentRuntime.autoRunCurrentRun,
231 totalRuns: currentRuntime.autoRunTotalRuns,
232 attemptRun: currentRuntime.autoRunAttemptRun,
233 }, {
234 autoRunTimerPlan: null,
235 scheduledAutoRunPlan: null,
236 });
237 clearStopRequest();
238 }
239
240 function startAutoRunLoop(totalRuns, options = {}) {
241 autoRunLoop(totalRuns, options).catch((error) => {

Callers 2

handleMessageFunction · 0.70
startAutoRunLoopFunction · 0.70

Calls 5

broadcastAutoRunStatusFunction · 0.85
clearStopRequestFunction · 0.85
addLogFunction · 0.70
getErrorMessageFunction · 0.70
isStopErrorFunction · 0.50

Tested by

no test coverage detected