File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 36
36
37
37
printStackTrace . implementation . prototype = {
38
38
/**
39
- * @param {Error } ex The error to create a stacktrace from (optional)
40
- * @param {String } mode Forced mode (optional, mostly for unit tests)
39
+ * @param {Error } [ex] The error to create a stacktrace from (optional)
40
+ * @param {String } [ mode] Forced mode (optional, mostly for unit tests)
41
41
*/
42
42
run : function ( ex , mode ) {
43
43
ex = ex || this . createException ( ) ;
44
- // examine exception properties w/o debugger
45
- //for (var prop in ex) {alert("Ex['" + prop + "']=" + ex[prop]);}
46
44
mode = mode || this . mode ( ex ) ;
47
45
if ( mode === 'other' ) {
48
46
return this . other ( arguments . callee ) ;
274
272
fn = fnRE . test ( curr . toString ( ) ) ? RegExp . $1 || ANON : ANON ;
275
273
args = Array . prototype . slice . call ( curr [ 'arguments' ] || [ ] ) ;
276
274
stack [ stack . length ] = fn + '(' + this . stringifyArguments ( args ) + ')' ;
277
- curr = curr . caller ;
275
+ try {
276
+ curr = curr . caller ;
277
+ } catch ( e ) {
278
+ stack [ stack . length ] = '' + e ;
279
+ break ;
280
+ }
278
281
}
279
282
return stack ;
280
283
} ,
You can’t perform that action at this time.
0 commit comments