Protect against a FF bug: Exceptions don't always have a message property even though they were instantiated with one. Using Error#toString alleviates this

This commit is contained in:
Dan Hansen and Davis W. Frank
2013-03-01 10:43:09 -08:00
parent b7af6abca5
commit b22bf9a031
3 changed files with 9 additions and 2 deletions

View File

@@ -114,5 +114,5 @@ jasmine.Spec.prototype.getFullName = function() {
jasmine.Spec.pendingSpecExceptionMessage = "=> marked Pending";
jasmine.Spec.isPendingSpecException = function(e) {
return e.message.indexOf(jasmine.Spec.pendingSpecExceptionMessage) === 0;
return e.toString().indexOf(jasmine.Spec.pendingSpecExceptionMessage) !== -1;
};