You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started using stacktracejs on OpenProcessing, and realized that in cases where error is a simple error without error.stack (e.g. a syntax error), stacktracejs returns an empty trace array, although the exception itself actually includes the filename, linenumber, charnumber.
window.onerror = function (msg, url, lineNumber, columnNo, error) { //no error.trace, but stacktrace can use msg, url, lineNumber, columnNo to create a single element array. StackTrace.fromError(error) .then(function(stackArray){ //stackArray is empty }) .catch(function (err) { //doesnt come here either }); } }
proposed solution
if error.stack is not accessible, stacktrace can still return a single item array using msg, url, lineNumber, columnNo provided.
What do you think?
The text was updated successfully, but these errors were encountered:
Hello!
I started using stacktracejs on OpenProcessing, and realized that in cases where error is a simple error without error.stack (e.g. a syntax error), stacktracejs returns an empty trace array, although the exception itself actually includes the filename, linenumber, charnumber.
window.onerror = function (msg, url, lineNumber, columnNo, error) { //no error.trace, but stacktrace can use msg, url, lineNumber, columnNo to create a single element array. StackTrace.fromError(error) .then(function(stackArray){ //stackArray is empty }) .catch(function (err) { //doesnt come here either }); } }
proposed solution
if error.stack is not accessible, stacktrace can still return a single item array using msg, url, lineNumber, columnNo provided.
What do you think?
The text was updated successfully, but these errors were encountered: