From 2172b12f7f4dc0da9308fcab13001cf2e34bd27b Mon Sep 17 00:00:00 2001 From: madanagopalt Date: Fri, 17 Apr 2020 09:54:22 -0400 Subject: [PATCH 1/2] show complete error stack on exception --- examples/pxScene2d/src/rcvrcore/initGL.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pxScene2d/src/rcvrcore/initGL.js b/examples/pxScene2d/src/rcvrcore/initGL.js index d7be726b26..a7000d7f12 100644 --- a/examples/pxScene2d/src/rcvrcore/initGL.js +++ b/examples/pxScene2d/src/rcvrcore/initGL.js @@ -199,7 +199,7 @@ var xxsetImmediate = function(f){ f.apply(null,rest) if (this.active) this.global.endDrawing(); } catch(e) { - console.log(e); + console.error(e.stack||e); console.log("exception during draw in setImmediate !!"); } //console.log('after end Drawing3') From 2160f878e234504b80fc131b89259037e9faf313 Mon Sep 17 00:00:00 2001 From: madanagopalt Date: Fri, 17 Apr 2020 09:54:22 -0400 Subject: [PATCH 2/2] show complete error stack on exception --- examples/pxScene2d/src/rcvrcore/initGL.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/pxScene2d/src/rcvrcore/initGL.js b/examples/pxScene2d/src/rcvrcore/initGL.js index d7be726b26..3575df6daa 100644 --- a/examples/pxScene2d/src/rcvrcore/initGL.js +++ b/examples/pxScene2d/src/rcvrcore/initGL.js @@ -143,7 +143,8 @@ var xxsetInterval = function(f,i){ f.apply(null,rest); this.global.endDrawing(); } catch(e) { - console.log("exception during draw in setInterval !!"); + console.log('EXCEPTION: Stack:' + e.stack||e); + console.log("EXCEPTION: Exception during draw in setInterval !!"); }}.bind(this) }.bind(this)(),i) this._intervals.push(interval) @@ -167,8 +168,8 @@ var xxsetTimeout = function(f,t){ f.apply(null,rest); this.global.endDrawing(); } catch(e) { - console.log(e); - console.log("exception during draw in setTimeout !!"); + console.log('EXCEPTION: Stack:' + e.stack||e); + console.log("EXCEPTION: Exception during draw in setTimeout !!"); } //console.log('after end Drawing2') var index = this._timeouts.indexOf(timeout) @@ -199,8 +200,8 @@ var xxsetImmediate = function(f){ f.apply(null,rest) if (this.active) this.global.endDrawing(); } catch(e) { - console.log(e); - console.log("exception during draw in setImmediate !!"); + console.log('EXCEPTION: Stack:' + e.stack||e); + console.log("EXCEPTION: Exception during draw in setImmediate !!"); } //console.log('after end Drawing3') var index = this._immediates.indexOf(timeout)