Skip to content

CoyPan/Fec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FEC

front error collector

Usage

  1. 为了保证能收集到所有错误,暂时只支持使用<script>的方式引用。或者直接内联写在script中。在页面加载其他js文件之前引入Fec。
<html>
    <head>
        ...
        <script src='http://xxxxxxx/fec.js'></script>
        ...
    </head>
    <body>
        ...
    </body>
</html>
  1. 基本用法:
     function errorCb(e){
            console.log('出错了---start----');
            console.log(e);
            console.log('出错了---end----');
        }

    var fecIntance = new Fec({
        onError: errorCb
    });
    fecIntance.init();

About

front-end error collector

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published