mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 14:27:05 +02:00
fix: catch thrown errors in ap helpers._test
This commit is contained in:
@@ -33,7 +33,11 @@ Helpers._webfingerCache = webfingerCache; // exported for tests
|
||||
Helpers._test = (method, args) => {
|
||||
// because I am lazy and I probably wrote some variant of this below code 1000 times already
|
||||
setTimeout(async () => {
|
||||
console.log(await method.apply(method, args));
|
||||
try {
|
||||
console.log(await method.apply(method, args));
|
||||
} catch (e) {
|
||||
console.log('Exception thrown', e);
|
||||
}
|
||||
}, 2500);
|
||||
};
|
||||
// process.nextTick(() => {
|
||||
|
||||
Reference in New Issue
Block a user