c8e52882c
46e2da24a
e32c453bc
3e0371685
1
2 3
4
5
6
7
8 9 10 11 12 13 14
import {DoneCallback} from '../../src/types'; export const reportCallbackErrors = (done: DoneCallback) => { return (f: (...args: any[]) => void) => { const wrapped = async (...args: any[]) => { try { f(...args); } catch (err) { done(err); } }; return wrapped; }; };