unhandledrejection

unhandledrejection,即未使用catch处理的Promise错误:

Promise.reject("hello");

Fundebug插件捕获的这个错误之后,开发者将受到报警,然后可以在我们的控制台查看错误详情:


Fundebug插件捕获的错误数据如下:

{
    "notifierVersion": "1.5.1",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36",
    "locale": "zh-CN",
    "url": "http://localhost:3001",
    "title": "TEST",
    "releaseStage": null,
    "name": "unhandledrejection",
    "time": 1546521929451,
    "message": "hello",
    "type": "unhandledrejection"
}

过滤

如果不需要监控unhandledrejection的话,可以通过配置filters来实现:

if ("fundebug" in window) {
    fundebug.filters = [
    {
        message: /^unhandledrejection$/
    }]
}

results matching ""

    No results matching ""