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
{{ message }}
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.
This will add a string property called "stack" to the specified object that contains the stack trace from the current point.
The actual V8 implementation takes an optional second parameter that specifies a function where the stack trace should be trimmed -- we will NOT implement this parameter.
In addition, if the user assigns a function to the property:
Error.prepareStackTrace
then we will call it when formatting any stack trace, passing it an array of CallSite objects. This will work as much like V8 as we can make it, which means that we will implement all the functions on CallSite, although only the following ones will be able to work reliably:
getFunctionName()
getFileName()
getLineNumber()
These APIs will be supported in both interpreted and compiled mode.
The text was updated successfully, but these errors were encountered:
For better compatibility with V8, we will add an implementation of the stack trace API from V8, as defined here:
https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
Specifically, we'll add a new method methods:
Error.captureStackTrace(object)
This will add a string property called "stack" to the specified object that contains the stack trace from the current point.
The actual V8 implementation takes an optional second parameter that specifies a function where the stack trace should be trimmed -- we will NOT implement this parameter.
In addition, if the user assigns a function to the property:
Error.prepareStackTrace
then we will call it when formatting any stack trace, passing it an array of CallSite objects. This will work as much like V8 as we can make it, which means that we will implement all the functions on CallSite, although only the following ones will be able to work reliably:
getFunctionName()
getFileName()
getLineNumber()
These APIs will be supported in both interpreted and compiled mode.
The text was updated successfully, but these errors were encountered: