Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
501 views
in Technique[技术] by (71.8m points)

javascript - 在生产中捕获浏览器Javascript异常并发送通知(Catch browser Javascript exception in production and send notification)

I have Rails 5 app, in this app I use gem 'exception_notification'.

(我有Rails 5应用,在这个应用中我使用gem'exception_notification'。)

This awesome gem, sends me email notifications if something went wrong in production mode.

(如果生产模式出现问题,这个很棒的宝石会向我发送电子邮件通知。)

But this notifications only for rails backend.

(但是此通知仅适用于rails后端。)

Can you advise me an some analog JS lib for Javascript frontend in browser.

(您能建议我在浏览器中使用Java前端的模拟JS库吗?)

My goal catch JS exceptions in browser in production mode send some request to server and then server send me notification(email) with error description, stacktrace info and so on.

(我的目标是在生产模式下的浏览器中捕获JS异常,向服务器发送一些请求,然后服务器向我发送带有错误描述,stacktrace信息等的通知(电子邮件)。)

I know about window.onerror event.

(我知道window.onerror事件。)

But in that case I should handle all of it manualy.

(但是在那种情况下,我应该手动处理所有问题。)

May be there is some JS lib with turnkey solution?

(可能有一些带有交钥匙解决方案的JS库?)

Thank You.

(谢谢。)

  ask by greenif translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...