Switch over to Lerna + Yarn Workspaces setup for a mono-repo approach
This commit is contained in:
14
packages/0x.js/test/utils/report_callback_errors.ts
Normal file
14
packages/0x.js/test/utils/report_callback_errors.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { DoneCallback } from '../../src/types';
|
||||
|
||||
export const reportCallbackErrors = (done: DoneCallback) => {
|
||||
return (f: (...args: any[]) => void) => {
|
||||
const wrapped = (...args: any[]) => {
|
||||
try {
|
||||
f(...args);
|
||||
} catch (err) {
|
||||
done(err);
|
||||
}
|
||||
};
|
||||
return wrapped;
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user