@abcnews/err 中文文档教程
err
用于在 ABC 新闻站点上记录错误的简单包装器。
const errorLogger = require('@abcnews/err')('your project tag');
try {
// some code which throws
} catch(e) {
errorLogger(e);
}
// Or
Promise.reject('Meltdown').catch(errorLogger);
err
A simple wrapper for logging errors on the ABC News site.
const errorLogger = require('@abcnews/err')('your project tag');
try {
// some code which throws
} catch(e) {
errorLogger(e);
}
// Or
Promise.reject('Meltdown').catch(errorLogger);