File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -407,18 +407,17 @@ var jsPDF = (function(global) {
407
407
}
408
408
events . publish ( 'addFonts' , { fonts : fonts , dictionary : fontmap } ) ;
409
409
} ,
410
- SAFE = function ( fn ) {
411
- fn . foo = function ( ) {
410
+ SAFE = function __safeCall ( fn ) {
411
+ fn . foo = function __safeCallWrapper ( ) {
412
412
try {
413
413
return fn . apply ( this , arguments ) ;
414
414
} catch ( e ) {
415
415
var stack = e . stack || '' ;
416
416
if ( ~ stack . indexOf ( ' at ' ) ) stack = stack . split ( " at " ) [ 1 ] ;
417
417
var m = "Error in function " + stack . split ( "\n" ) [ 0 ] . split ( '<' ) [ 0 ] + ": " + e . message ;
418
418
if ( global . console ) {
419
- console . log ( m , e ) ;
419
+ global . console . error ( m , e ) ;
420
420
if ( global . alert ) alert ( m ) ;
421
- console . trace ( ) ;
422
421
} else {
423
422
throw new Error ( m ) ;
424
423
}
You can’t perform that action at this time.
0 commit comments