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

@@ -8,7 +8,7 @@ jasmine.Spec = function(attrs) {
this.fn = attrs.fn;
this.beforeFns = attrs.beforeFns || function() {};
this.afterFns = attrs.afterFns || function() {};
this.catchExceptions = attrs.catchExceptions;
this.catchingExceptions = attrs.catchingExceptions;
this.startCallback = attrs.startCallback || function() {};
this.exceptionFormatter = attrs.exceptionFormatter || function() {};
this.getSpecName = attrs.getSpecName;
@@ -54,8 +54,9 @@ jasmine.Spec.prototype.execute = function() {
message: self.exceptionFormatter(e),
trace: e
}));
if (!self.catchExceptions) {
resultCallback();
if (!self.catchingExceptions()) {
//TODO: set a var when we catch an exception and
//use a finally block to close the loop in a nice way..
throw e;
}
}