Permalink
Browse files

Added URL flag ?notrycatch (ala ?noglobals) for debugging exceptions.

Won't try/catch test code, giving better debugging changes on the
original exceptions. Fixes #72
  • Loading branch information...
1 parent 074e291 commit c532d183664118fc2ca13a0b1b478f4c31e3e865 @jzaefferer jzaefferer committed Jan 12, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 qunit/qunit.js
View
8 qunit/qunit.js
@@ -93,6 +93,10 @@ Test.prototype = {
QUnit.stop();
}
+ if ( config.notrycatch ) {
+ this.callback.call(this.testEnvironment);
+ return;
+ }
try {
this.callback.call(this.testEnvironment);
} catch(e) {
@@ -436,6 +440,10 @@ var config = {
GETParams.splice( i, 1 );
i--;
config.noglobals = true;
+ } else if ( GETParams[i] === "notrycatch" ) {
+ GETParams.splice( i, 1 );
+ i--;
+ config.notrycatch = true;
} else if ( GETParams[i].search('=') > -1 ) {
GETParams.splice( i, 1 );
i--;

0 comments on commit c532d18

Please sign in to comment.