Entry: JS_ReportError (Function)
Summary: Creates a formatted error message to pass to a user-defined error reporting function.
Syntax:
void JS_ReportError(JSContext *cx, const char *format, ...);
Argument Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information.
format const char * Format string to convert into an error message using a standard C sprintf conversion routine.
... Error message variables to insert into the format string.
Description:
JS_ReportError converts a format string and its arguments, format, into an error message using a sprintf-like conversion routine. The resulting string is automatically passed to the user-defined error reporting mechanism. That mechanism might display the error message in a console or dialog box window (as in Navigator 2.0 and greater), or might write the error message to an error log file maintained by the application.
Specify an error reporting mechanism for your application using JS_SetErrorReporter.
See also:
|
|
|