| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Error/stack | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
: . , , . , , , .
stack Error , , . .
; ( ), (@), ( , , ), , , . , Error fileName, lineNumber columnNumber, , ( , ).
, Firefox. . , Safari 6+ Opera 12- . , , JavaScript V8 (, Chrome, Opera 15+, Android) IE10+, ( error.stack MSDN).
: Firefox 14 (Firefox bug 744842) (@) , . ( ) "[object Object]", , , , ( Firefox 14 arguments.callee.caller.arguments, arguments.callee.caller.name). "undefined" "(void 0)". , , "@", "(", ")" ( ), . , Firefox 14 .
HTML stack.
<!doctype html>
<meta charset="UTF-8" />
<title> </title>
<body>
<script>
function trace() {
try {
throw new Error(" ");
} catch (e) {
alert(e.stack);
}
}
function b() {
trace();
}
function a() {
b(3, 4, "\n\n", undefined, {});
}
a(" , ");
</script>
</body>
, C:\example.html Windows. :
Firefox 30 , (Firefox bug 762556):
trace@file:///C:/example.html:9:17 b@file:///C:/example.html:16:13 a@file:///C:/example.html:19:13 @file:///C:/example.html:21:9
Firefox 14 Firefox 29:
trace@file:///C:/example.html:9 b@file:///C:/example.html:16 a@file:///C:/example.html:19 @file:///C:/example.html:21
Firefox 13 :
Error(" ")@:0
trace()@file:///C:/example.html:9
b(3,4,"\n\n",(void 0),[object Object])@file:///C:/example.html:16
a(" , ")@file:///C:/example.html:19
@file:///C:/example.html:21
eval() Firefox 30, Function() eval() . Function "> Function", eval() "> eval". Firefox bug 332176.
try {
new Function("throw new Error()")();
} catch (e) {
console.log(e.stack);
}
// anonymous@file:///C:/example.html line 7 > Function:1:1
// @file:///C:/example.html:7:6
try {
eval("eval('FAIL')");
} catch (x) {
console.log(x.stack);
}
// @file:///C:/example.html line 7 > eval line 1 > eval:1:1
// @file:///C:/example.html line 7 > eval:1:1
// @file:///C:/example.html:7:6
eval() //# sourceURL. eval() , ( ).
- . .
This page was last modified on 17 . 2024 . by MDN contributors.
ErrorObject/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()AggregateErrorEvalErrorInternalErrorRangeErrorReferenceErrorSyntaxErrorTypeErrorURIErrorYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |