xpcom/base/nsIException.idlScriptable
Please add a summary to this article.
Inherits from: nsISupports Last changed in Gecko 1.7

Method overview

string toString();

Attributes

Attribute Type Description
caller nsIStackFrame 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