INNER CODE UNIT · JavaScript

errorHandler

figranium/figranium · src/agent/figranite/index.js:482

                    errorHandler = { start: index + 1, end: endIndex };
                    logs.push('On-error handler registered.');
                    reportActionProgress(act, 'success');
                    index = endIndex + 1;
                    continue;
                }
            }

            if (act.type === 'if') {
                try {
                    reportActionProgress(act, 'running');
                    const hasStructured = act.conditionVarType || act.conditionOp || act.conditionVar || act.conditionValue;
                    const condition = hasStructured
                        ? await evalStructuredCondition(act, page, runtimeVars, resolveTemplate)
                        : await evalCondition(act.value, page, runtimeVars, lastBlockOutput, resolveTemplate);
                    setBlockOutput(condition);
                    logs.push(`If condition: ${condition ? 'true' : 'false'}`);
                    reportActionProgress(act, 'success', condition);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…