Remove jasmine.CATCH_EXCEPTIONS

- HTMLReporters should be rewritten to make this sort of thing easier.
- Fix HTMLReporter try/catch switch
- We can't really call resultCallback & throw, so that's been reverted
  for now.
This commit is contained in:
Rajan Agaskar
2012-12-07 17:26:59 -08:00
parent 98c99c4ebb
commit 43552494ee
15 changed files with 78 additions and 84 deletions

View File

@@ -9,6 +9,7 @@
var self = this;
var global = options.global || jasmine.getGlobal();
var catchExceptions = true;
var encourageGC = options.encourageGarbageCollection || encourageGarbageCollection;
this.clock = new jasmine.Clock(global, new jasmine.DelayedFunctionScheduler());
@@ -21,7 +22,6 @@
this.currentRunner_ = new jasmine.Runner(this, isSuite);
this.spies_ = [];
this.currentSpec = null;
this.catchExceptions = jasmine.CATCH_EXCEPTIONS;
this.undefined = jasmine.undefined;
this.reporter = new jasmine.MultiReporter();
@@ -87,6 +87,14 @@
return buildExpectationResult(attrs);
};
this.catchExceptions = function(value) {
return catchExceptions = !!value;
}
this.catchingExceptions = function(value) {
return catchExceptions;
}
this.specFactory = function(description, fn, suite) {
var spec = new specConstructor({
id: self.nextSpecId(),
@@ -98,7 +106,7 @@
getSpecName: function(spec) { return getSpecName(spec, suite) },
startCallback: startCallback,
description: description,
catchExceptions: self.catchExceptions,
catchingExceptions: this.catchingExceptions,
expectationResultFactory: expectationResultFactory,
fn: fn
});