export declare const template = "if (__error instanceof RestoreSignal) {\n  throw __error;\n}\n// GuardExceededError must propagate up to the stdlib `guard`\n// function's try/catch (in lib/runtime/result.ts via `try block()`).\n// If we converted it to a Failure here, the guard would never see\n// the trip and every guarded block would appear to succeed even\n// over budget. See lib/runtime/guard.ts.\nif (__error instanceof GuardExceededError) {\n  throw __error;\n}\n// Surface the underlying exception via logger + statelog before\n// converting to a Failure. Without this, a caller that doesn't\n// inspect the result (the common case for void side-effect calls)\n// silently loses the error \u2014 a debugging nightmare. See the\n// recordAlwaysScoped bug debugged in\n// https://ampcode.com/threads/T-019e7a3a-edfa-74d6-917a-255c31bf8491.\n{\n  const __errMsg = __error instanceof Error ? __error.message : String(__error);\n  const __errStack = __error instanceof Error && __error.stack ? __error.stack : \"\";\n  const __log = __createLogger(__ctx.logLevel);\n  __log.error(\"Function \" + {{{functionName}}} + \" threw an exception (converted to Failure): \" + __errMsg);\n  if (__errStack) __log.error(__errStack);\n  __ctx.statelogClient?.error?.({\n    errorType: \"runtimeError\",\n    message: __errMsg,\n    functionName: {{{functionName}}},\n    retryable: __self.__retryable,\n  });\n}\nreturn failure(\n  __error instanceof Error ? __error.message : String(__error),\n  {\n    checkpoint: getRuntimeContext().ctx.getResultCheckpoint(),\n    retryable: __self.__retryable,\n    functionName: {{{functionName}}},\n    args: __stack.args,\n  }\n);\n";
export type TemplateType = {
    functionName: string | boolean | number;
};
declare const render: (args: TemplateType) => string;
export default render;
