Skip to content

Commit a297a9e

Browse files
committed
error fixes
1 parent dc12c97 commit a297a9e

File tree

5 files changed

+37
-37
lines changed

5 files changed

+37
-37
lines changed

Algebra.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ if((typeof module) !== 'undefined') {
830830
}
831831
}
832832
catch(e) {
833-
if (e.message === "timeout") throw error;
833+
if (e.message === "timeout") throw e;
834834
}
835835
;
836836
};
@@ -2161,7 +2161,7 @@ if((typeof module) !== 'undefined') {
21612161
}
21622162
}
21632163
catch(e) {
2164-
if (e.message === "timeout") throw error;
2164+
if (e.message === "timeout") throw e;
21652165

21662166
;
21672167
}
@@ -2273,7 +2273,7 @@ if((typeof module) !== 'undefined') {
22732273
}
22742274
}
22752275
catch(e) {
2276-
if (e.message === "timeout") throw error;
2276+
if (e.message === "timeout") throw e;
22772277
}
22782278
;
22792279

@@ -2917,7 +2917,7 @@ if((typeof module) !== 'undefined') {
29172917
return poly.toSymbol();
29182918
}
29192919
catch(e) {
2920-
if (e.message === "timeout") throw error;
2920+
if (e.message === "timeout") throw e;
29212921
return untouched;
29222922
}
29232923
},
@@ -3141,7 +3141,7 @@ if((typeof module) !== 'undefined') {
31413141
}
31423142
}
31433143
catch(e) {
3144-
if (e.message === "timeout") throw error;
3144+
if (e.message === "timeout") throw e;
31453145
;
31463146
}
31473147

@@ -3940,7 +3940,7 @@ if((typeof module) !== 'undefined') {
39403940
return [quot, rem];
39413941
}
39423942
catch(e) {
3943-
if (e.message === "timeout") throw error;
3943+
if (e.message === "timeout") throw e;
39443944
return fail;
39453945
}
39463946

@@ -4117,7 +4117,7 @@ if((typeof module) !== 'undefined') {
41174117
return retval;
41184118
}
41194119
catch(e) {
4120-
if (e.message === "timeout") throw error;
4120+
if (e.message === "timeout") throw e;
41214121
//try to group symbols
41224122
try {
41234123
if(symbol.isComposite()) {
@@ -5130,7 +5130,7 @@ if((typeof module) !== 'undefined') {
51305130
return sq.f;
51315131
}
51325132
catch(e) {
5133-
if (e.message === "timeout") throw error;
5133+
if (e.message === "timeout") throw e;
51345134
return x;
51355135
}
51365136
};

Calculus.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ if((typeof module) !== 'undefined' && typeof nerdamer === 'undefined') {
12691269
retval = __.integrate(fx, u).sub(u, sq.a);
12701270
}
12711271
catch(e) {
1272-
if (e.message === "timeout") throw error;
1272+
if (e.message === "timeout") throw e;
12731273
__.integration.stop();
12741274
}
12751275
}
@@ -1570,7 +1570,7 @@ if((typeof module) !== 'undefined' && typeof nerdamer === 'undefined') {
15701570
retval = __.integration.u_substitution(symbols, dx);
15711571
}
15721572
catch(e) {/* failed :`(*/
1573-
if (e.message === "timeout") throw error;
1573+
if (e.message === "timeout") throw e;
15741574
;
15751575
}
15761576

@@ -2137,7 +2137,7 @@ if((typeof module) !== 'undefined' && typeof nerdamer === 'undefined') {
21372137
return _.parse(integral, vars);
21382138
}
21392139
catch(e) {
2140-
if (e.message === "timeout") throw error;
2140+
if (e.message === "timeout") throw e;
21412141
//it failed for some reason so return the limit
21422142
var lim = __.Limit.limit(integral, dx, point);
21432143
return lim;
@@ -2298,7 +2298,7 @@ if((typeof module) !== 'undefined' && typeof nerdamer === 'undefined') {
22982298
retval = f.sub(x, lim);
22992299
}
23002300
catch(e) {
2301-
if (e.message === "timeout") throw error;
2301+
if (e.message === "timeout") throw e;
23022302
//Nope. No go, so just return the unsubbed function so we can test the limit instead.
23032303
retval = f;
23042304
}
@@ -2370,7 +2370,7 @@ if((typeof module) !== 'undefined' && typeof nerdamer === 'undefined') {
23702370

23712371
}
23722372
catch(e) { /*Nothing. Maybe we tried to divide by zero.*/
2373-
if (e.message === "timeout") throw error;
2373+
if (e.message === "timeout") throw e;
23742374
}
23752375
;
23762376

@@ -2428,7 +2428,7 @@ if((typeof module) !== 'undefined' && typeof nerdamer === 'undefined') {
24282428
evaluates = true;
24292429
}
24302430
catch(e) {
2431-
if (e.message === "timeout") throw error;
2431+
if (e.message === "timeout") throw e;
24322432

24332433
evaluates = false;
24342434
}
@@ -2574,15 +2574,15 @@ if((typeof module) !== 'undefined' && typeof nerdamer === 'undefined') {
25742574
_lim = __.Limit.limit(sym, x, lim, depth);
25752575
}
25762576
catch(e) {
2577-
if (e.message === "timeout") throw error;
2577+
if (e.message === "timeout") throw e;
25782578
_lim = __.Limit.diverges();
25792579
}
25802580

25812581
try {
25822582
retval = _.add(retval, _lim);
25832583
}
25842584
catch(e) {
2585-
if (e.message === "timeout") throw error;
2585+
if (e.message === "timeout") throw e;
25862586
if(depth++ > Settings.max_lim_depth) {
25872587
return;
25882588
}
@@ -2604,7 +2604,7 @@ if((typeof module) !== 'undefined' && typeof nerdamer === 'undefined') {
26042604
retval = _.symfunction('limit', [symbol, x, lim]);
26052605
}
26062606
catch(e) {
2607-
if (e.message === "timeout") throw error;
2607+
if (e.message === "timeout") throw e;
26082608
//if all else fails return the symbolic function
26092609
retval = _.symfunction('limit', [symbol, x, lim]);
26102610
}

Extra.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ if((typeof module) !== 'undefined') {
434434
retval = sorted[Math.floor(l / 2)];
435435
}
436436
catch(e) {
437-
if (e.message === "timeout") throw error;
437+
if (e.message === "timeout") throw e;
438438
retval = _.symfunction('median', args);
439439
}
440440
return retval;

Solve.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ if((typeof module) !== 'undefined') {
624624
return __.solveNonLinearSystem(eqns);
625625
}
626626
catch(e) {
627-
if (e.message === "timeout") throw error;
627+
if (e.message === "timeout") throw e;
628628
if(e instanceof core.exceptions.DivisionByZero) {
629629
return __.solveSystemBySubstitution(eqns);
630630
}
@@ -1472,7 +1472,7 @@ if((typeof module) !== 'undefined') {
14721472
add_to_result(new Symbol(0));
14731473
}
14741474
catch(e) {
1475-
if (e.message === "timeout") throw error;
1475+
if (e.message === "timeout") throw e;
14761476
// Do nothing;
14771477
}
14781478

@@ -1809,7 +1809,7 @@ if((typeof module) !== 'undefined') {
18091809
// console.log("solutions after filter: "+solutions);
18101810
}
18111811
catch(e) {
1812-
if (e.message === "timeout") throw error;
1812+
if (e.message === "timeout") throw e;
18131813
console.log(e);
18141814
}
18151815
}
@@ -1890,7 +1890,7 @@ if((typeof module) !== 'undefined') {
18901890

18911891
}
18921892
catch(e) { /*something went wrong. EXITING*/
1893-
if (e.message === "timeout") throw error;
1893+
if (e.message === "timeout") throw e;
18941894
;
18951895
}
18961896
}
@@ -1991,7 +1991,7 @@ if((typeof module) !== 'undefined') {
19911991
return true;
19921992
}
19931993
catch(e) {
1994-
if (e.message === "timeout") throw error;
1994+
if (e.message === "timeout") throw e;
19951995
return false;
19961996
}
19971997
});

nerdamer.core.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,7 @@ var nerdamer = (function (imports) {
19041904
}
19051905
}
19061906
catch(e) {
1907-
if (e.message === "timeout") throw error;
1907+
if (e.message === "timeout") throw e;
19081908
//reset factors
19091909
factors = {};
19101910
add(input);
@@ -2114,7 +2114,7 @@ var nerdamer = (function (imports) {
21142114
retval = integrate(f, a, b, tol, maxdepth);
21152115
}
21162116
catch(e) {
2117-
if (e.message === "timeout") throw error;
2117+
if (e.message === "timeout") throw e;
21182118
/*fallback to non-adaptive*/
21192119
return Math2.simpson(f, a, b);
21202120
}
@@ -2679,7 +2679,7 @@ var nerdamer = (function (imports) {
26792679
return obj.toString();
26802680
}
26812681
catch(e) {
2682-
if (e.message === "timeout") throw error;
2682+
if (e.message === "timeout") throw e;
26832683
return '';
26842684
}
26852685
}
@@ -2870,7 +2870,7 @@ var nerdamer = (function (imports) {
28702870
return this.symbol.toString();
28712871
}
28722872
catch(e) {
2873-
if (e.message === "timeout") throw error;
2873+
if (e.message === "timeout") throw e;
28742874
return '';
28752875
}
28762876
},
@@ -2936,7 +2936,7 @@ var nerdamer = (function (imports) {
29362936
return d.equals(0);
29372937
}
29382938
catch(e) {
2939-
if (e.message === "timeout") throw error;
2939+
if (e.message === "timeout") throw e;
29402940
return false;
29412941
}
29422942
;
@@ -2949,7 +2949,7 @@ var nerdamer = (function (imports) {
29492949
return d.lessThan(0);
29502950
}
29512951
catch(e) {
2952-
if (e.message === "timeout") throw error;
2952+
if (e.message === "timeout") throw e;
29532953
return false;
29542954
}
29552955
;
@@ -2962,7 +2962,7 @@ var nerdamer = (function (imports) {
29622962
return d.greaterThan(0);
29632963
}
29642964
catch(e) {
2965-
if (e.message === "timeout") throw error;
2965+
if (e.message === "timeout") throw e;
29662966
return false;
29672967
}
29682968
},
@@ -3151,7 +3151,7 @@ var nerdamer = (function (imports) {
31513151
this.den = bigInt(1);
31523152
}
31533153
catch(e) {
3154-
if (e.message === "timeout") throw error;
3154+
if (e.message === "timeout") throw e;
31553155
return Frac.simple(n);
31563156
}
31573157
}
@@ -3162,7 +3162,7 @@ var nerdamer = (function (imports) {
31623162
}
31633163
}
31643164
catch(e) {
3165-
if (e.message === "timeout") throw error;
3165+
if (e.message === "timeout") throw e;
31663166
return Frac.simple(n);
31673167
}
31683168

@@ -8228,7 +8228,7 @@ var nerdamer = (function (imports) {
82288228
}
82298229
}
82308230
catch(e) {
8231-
if (e.message === "timeout") throw error;
8231+
if (e.message === "timeout") throw e;
82328232
return original;
82338233
}
82348234
}
@@ -8486,7 +8486,7 @@ var nerdamer = (function (imports) {
84868486
n = Frac.simple(n);
84878487
}
84888488
catch(e) {
8489-
if (e.message === "timeout") throw error;
8489+
if (e.message === "timeout") throw e;
84908490
n = new Frac(n);
84918491
}
84928492
}
@@ -8711,7 +8711,7 @@ var nerdamer = (function (imports) {
87118711
return retval;
87128712
}
87138713
catch(e) {
8714-
if (e.message === "timeout") throw error;
8714+
if (e.message === "timeout") throw e;
87158715
return original;
87168716
}
87178717

@@ -12493,7 +12493,7 @@ var nerdamer = (function (imports) {
1249312493
return C[add_on].version;
1249412494
}
1249512495
catch(e) {
12496-
if (e.message === "timeout") throw error;
12496+
if (e.message === "timeout") throw e;
1249712497
return "No module named " + add_on + " found!";
1249812498
}
1249912499
}
@@ -12724,7 +12724,7 @@ var nerdamer = (function (imports) {
1272412724
return RESERVED.indexOf(varname) === -1;
1272512725
}
1272612726
catch(e) {
12727-
if (e.message === "timeout") throw error;
12727+
if (e.message === "timeout") throw e;
1272812728
return false;
1272912729
}
1273012730
};

0 commit comments

Comments
 (0)