runWithErrorHandling() — astro Function Reference
Architecture documentation for the runWithErrorHandling() function in controller.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 4f574be3_c24f_a1bc_93bf_bd9c9060318b["runWithErrorHandling()"] 417f2af6_8a2f_2b06_192e_b74a580ea934["controller.ts"] 4f574be3_c24f_a1bc_93bf_bd9c9060318b -->|defined in| 417f2af6_8a2f_2b06_192e_b74a580ea934 style 4f574be3_c24f_a1bc_93bf_bd9c9060318b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/vite-plugin-astro-server/controller.ts lines 94–107
export async function runWithErrorHandling({
controller: { state },
pathname,
run,
onError,
}: RunWithErrorHandlingParams) {
try {
await run();
clearRouteError(state, pathname);
} catch (err) {
const error = onError(err);
setRouteError(state, pathname, error);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does runWithErrorHandling() do?
runWithErrorHandling() is a function in the astro codebase, defined in packages/astro/src/vite-plugin-astro-server/controller.ts.
Where is runWithErrorHandling() defined?
runWithErrorHandling() is defined in packages/astro/src/vite-plugin-astro-server/controller.ts at line 94.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free