Skip to content
  • Philip Chimento's avatar
    jsapi-util: Print out stack trace of SyntaxError, if there is one · ae948802
    Philip Chimento authored
    Previously, we would not print out the .stack property of a SyntaxError,
    but instead get its location from the .fileName, .lineNumber, and
    .columnNumber properties.
    
    This makes sense when assuming the SyntaxError arises from parsing a JS
    file; there isn't anywhere the error is thrown from.
    However, SyntaxErrors can actually be thrown from code: from JSON.parse(),
    Reflect.parse(), and import(), to name a few examples. So we should print
    out the stack trace if one is present.
    
    Closes: #584
    ae948802