简体   繁体   English

AngularJS:在生产中捕获错误堆栈

[英]AngularJS: catch error stack on production

I run my site on AngularJS and use New Relic JS errors notifications to detect errors. 我在AngularJS上运行我的网站,并使用New Relic JS错误通知来检测错误。

I want to fix major errors, and basically did it. 我想修复主要错误,基本上已经做到了。 But I can't reproduce one error that can be logged on any page of site: 但是我无法重现可以在网站任何页面上记录的一个错误:

Stack trace
UncaughtException: Script error.
    in evaluated code

I tried to visit those pages with the same browser, with low-speed connection, on Mac, Windows, Ubuntu as New Relic logged. 我尝试在Mac,Windows和Ubuntu上使用相同的浏览器,低速连接访问这些页面,并记录了New Relic。 But it didn't make sense. 但这没有道理。

So, my question is there any technique that can help me to catch this error or extend information about it? 因此,我的问题是,有什么技术可以帮助我捕获此错误或扩展有关该错误的信息? It can be common JS technique or AngularJS specific. 它可以是常见的JS技术或特定于AngularJS的。

The "Script error" message is one that it's difficult to get more details on, because the error occurred before New Relic's Javascript monitoring was able to wrap any of the script's functions. “脚本错误”消息是很难获得更多详细信息的消息,因为该错误发生在New Relic的Javascript监视能够包装任何脚本功能之前。 This can commonly occur during script loading, or it may mean that the error occurs during an interaction with a browser plugin or extension, or from an inline event handler. 这通常可以在脚本加载期间发生,或者可能意味着该错误是在与浏览器插件或扩展程序或内联事件处理程序进行交互期间发生的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM