Function: buildMonitorFactory()
buildMonitorFactory<
T>(factory: () =>T,scope:string):T
Defined in: electron/services/monitoring/shared/monitorFactoryUtils.ts:20
Executes the provided factory function and normalises any thrown error with a monitor-specific scope before rethrowing. This allows monitor service factories to safely initialise during module evaluation without triggering lint warnings about unhandled exceptions.
Type Parameters
T
T
Parameters
factory
() => T
Lazy factory invoked to build the monitor service.
scope
string
Human-readable monitor scope used when formatting the error.
Returns
T
The value produced by the factory.