简体   繁体   中英

Using RequireJS/Backbone.js and gathering errorception with sufficient information

We are starting to use RequireJS and Backbone.js. However, it is also important to gather errors that happen in production. For that we use errorception. We found that we don't get the stacktrace. Does anybody know of a way to fix that?

Actually, this was a false alarm. The reason that errorception did not show a stacktrace for a test that I did was because I executed:

throw 'foo bar';

The correct way was supposed to be:

throw new Error('foo bar');

I then tried to execute the following code without defining the variable a :

if (a === 5) {
  console.log('Should not come here.');
}

And there was the stacktrace in errorception. We've been using errorception for quite some time now and it is very helpful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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