Merge branch 'fix-missing-asynchronous-stacktrace' of https://github.com/prantlf/jasmine into prantlf-fix-missing-asynchronous-stacktrace

- Merges #1738 from @prantlf
- Fixes #1728
This commit is contained in:
Gregg Van Hove
2019-09-04 17:37:33 -07:00
4 changed files with 56 additions and 4 deletions

View File

@@ -49,8 +49,11 @@ getJasmineRequireObj().QueueRunner = function(j$) {
QueueRunner.prototype.execute = function() {
var self = this;
this.handleFinalError = function(error) {
self.onException(error);
this.handleFinalError = function(message, source, lineno, colno, error) {
// Older browsers would send the error as the first parameter. HTML5
// specifies the the five parameters above. The error instance should
// be preffered, otherwise the call stack would get lost.
self.onException(error || message);
};
this.globalErrors.pushListener(this.handleFinalError);
this.run(0);