User Tools

Site Tools


Error

ECMAScript Error prototype object.

More...

Inherits :

Inherited By : NativeError

Properties

Methods

ECMAScript
StringtoString ()
QtScript
Arraybacktrace ()

Detailed Description

The base object for Errors reported by the script interpreter. This object can also be used in script to create user-generated errors.

Properties


String : message

A string describing the error.


String : name

The name of the error. By default, it is “Error”.


String : fileName

The name of the script file the error occurred in, if available.


String : lineNumber

The line number that the error occurred on.


Array : stack

An array of stack trace objects. Each object in the array has the following properties:

  • functionName - The name of the function, if available.
  • filename - The name of the file, if available.
  • lineNumber - The line number, if available.

Methods


String : toString()

Return Value:

  • A string representation of the Error.

Array : backtrace()

Return Value:

  • An array of strings that contain a human-readable backtrace for the error.