nsIStackFrame 编辑
xpcom/base/nsIException.idl
Scriptable Please add a summary to this article. Inherits from: nsISupports
Last changed in Gecko 1.7Method overview
string toString(); |
Attributes
Attribute | Type | Description |
caller |
| Read only. |
filename | string | Filename location. This is the location that caused the error, which may or may not be a source file location. For example, standard language errors would generally have the same location as their top stack entry. File parsers may put the location of the file they were parsing, and so forth. null indicates "no data" Read only. |
language | PRUint32 | See nsIProgrammingLanguage for a list of language constants. Read only. |
languageName | string | See nsIProgrammingLanguage for a list of language constants. Read only. |
lineNumber | PRInt32 | Valid line numbers begin at '1'. '0' indicates unknown. Read only. |
name | string | The name of the function at this point in the stack. Read only. |
sourceLine | string | The location of this function in filename Read only. |
Example
To output the stack at a particular location:
var s = Components.stack; while(s) { console.log(s.name); s = s.caller; }
Methods
toString()
A generic formatter - make it suitable to print, and so forth.
string toString();
Parameters
None.
Return value
A string suitable for output.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论