MCPcopy Create free account
hub / github.com/buct2012dbl/Dorchestrator / withErrorHandlingSync

Function withErrorHandlingSync

coding-agent/src/errors/error-handler.ts:94–106  ·  view source on GitHub ↗
(
  fn: T,
  context?: Record<string, any>
)

Source from the content-addressed store, hash-verified

92
93// Wrapper for sync functions with error handling
94export function withErrorHandlingSync<T extends (...args: any[]) => any>(
95 fn: T,
96 context?: Record<string, any>
97): T {
98 return ((...args: Parameters<T>) => {
99 try {
100 return fn(...args);
101 } catch (error) {
102 errorHandler.handle(error as Error, context);
103 throw error;
104 }
105 }) as T;
106}

Callers

nothing calls this directly

Calls 2

fnFunction · 0.85
handleMethod · 0.80

Tested by

no test coverage detected