Skip to content

Commit efde6e2

Browse files
authored
Fix links to archived MSDN page (mdn#19928)
MSDN started redirecting this page back to MDN sometime between June and July, 2018. This is probably why the current links point to the archived version of the MDN page, caused by the Wayback Machine saving a redirect instead of the cited `error.stack` docs.
1 parent ce7e072 commit efde6e2

File tree

1 file changed

+3
-3
lines changed
  • files/en-us/web/javascript/reference/global_objects/error/stack

1 file changed

+3
-3
lines changed

files/en-us/web/javascript/reference/global_objects/error/stack/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ The non-standard **`stack`** property of {{jsxref("Error")}} objects offer a tra
1717

1818
Each step will be separated by a newline, with the first part of the line being the function name (if not a call from the global scope), then by an at (@) sign, the file location (except when the function is the error constructor as the error is being thrown), a colon, and, if there is a file location, the line number. (Note that the {{jsxref("Error")}} object also possesses the `fileName`, `lineNumber` and `columnNumber` properties for retrieving these from the error thrown (but only the error, and not its trace).)
1919

20-
Note that this is the format used by Firefox. There is no standard formatting. However, Safari 6+ and Opera 12- use a very similar format. Browsers using the V8 JavaScript engine (such as Chrome, Opera 15+, Android Browser) and IE10+, on the other hand, uses a different format (see [the archived MSDN error.stack docs](https://web.archive.org/web/20220312071445/https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack)).
20+
Note that this is the format used by Firefox. There is no standard formatting. However, Safari 6+ and Opera 12- use a very similar format. Browsers using the V8 JavaScript engine (such as Chrome, Opera 15+, Android Browser) and IE10+, on the other hand, uses a different format (see [the archived MSDN error.stack docs](https://web.archive.org/web/20180618201428/https://docs.microsoft.com/en-us/scripting/javascript/reference/stack-property-error-javascript)).
2121

2222
**Argument values in the stack**: Prior to Firefox 14, the function name would be followed by the argument values converted to string in parentheses immediately before the at (`@`) sign. While an object (or array, etc.) would appear in the converted form `"[object Object]"`, and as such could not be evaluated back into the actual objects, scalar values could be retrieved (though it may be — it is still possible in Firefox 14 — easier to use `arguments.callee.caller.arguments`, as could the function name be retrieved by `arguments.callee.caller.name`). `"undefined"` is listed as `"(void 0)"`. Note that if string arguments were passed in with values such as `"@"`, `"("`, `")"` (or if in file names), you could not easily rely on these for breaking the line into its component parts. Thus, in Firefox 14 and later this is less of an issue.
2323

24-
Different browsers set this value at different times. For example, Firefox sets it when creating an {{jsxref("Error")}} object, while PhantomJS sets it only when throwing the {{jsxref("Error")}}, and [archived MSDN docs](https://web.archive.org/web/20220312071445/https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack) also seem to match the PhantomJS implementation.
24+
Different browsers set this value at different times. For example, Firefox sets it when creating an {{jsxref("Error")}} object, while PhantomJS sets it only when throwing the {{jsxref("Error")}}, and [archived MSDN docs](https://web.archive.org/web/20180618201428/https://docs.microsoft.com/en-us/scripting/javascript/reference/stack-property-error-javascript) also seem to match the PhantomJS implementation.
2525

2626
## Examples
2727

@@ -121,5 +121,5 @@ Not part of any standard.
121121
## See also
122122

123123
- External projects: [TraceKit](https://github.com/csnover/TraceKit/) and [javascript-stacktrace](https://github.com/stacktracejs/stacktrace.js)
124-
- MSDN: [archived error.stack docs](https://web.archive.org/web/20220312071445/https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack)
124+
- MSDN: [archived error.stack docs](https://web.archive.org/web/20180618201428/https://docs.microsoft.com/en-us/scripting/javascript/reference/stack-property-error-javascript)
125125
- [Overview of the V8 JavaScript stack trace API](https://v8.dev/docs/stack-trace-api)

0 commit comments

Comments
 (0)