JavaScript-1.5 Reference

JS_SetErrorReporter Function

Summary

Specifies the error reporting mechanism for an application.

Syntax

JSErrorReporter JS_SetErrorReporter(JSContext *cx,
    JSErrorReporter er);
NameTypeDescription
cxJSContext *Pointer to a JS context from which to derive runtime information.
erJSErrorReporterThe user-defined error reporting function to use in your application.

Description

JS_SetErrorReporter enables you to define and use your own error reporting mechanism in your applications. The reporter you define is automatically passed a JSErrorReport structure when an error occurs and has been parsed by JS_ReportError.

Typically, the error reporting mechanism you define should log the error where appropriate (such as to a log file), and display an error to the user of your application. The error you log and display can make use of the information passed about the error condition in the JSErrorReport structure.

See Also

Groups [ Function ]
Documents [ LXR ID Search ]
Entries [ JSErrorReport | JS_ReportError | JS_ReportOutOfMemory ]

This page was generated by APIDOC