JS_ReportErrorNumber

  • Revision slug: SpiderMonkey/JSAPI_Reference/JS_ReportErrorNumber
  • Revision title: JS_ReportErrorNumber
  • Revision id: 138284
  • Created:
  • Creator: Jorend
  • Is current revision? No
  • Comment initial cut - not much here

Revision Content

{{template.Jsapi_ref_header("JS_ReportErrorNumber")}}

Syntax

void JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback,
    void *userRef, const uintN errorNumber, ...);

void JS_ReportErrorNumberUC(JSContext *cx, JSErrorCallback errorCallback,
    void *userRef, const uintN errorNumber, ...);

JSBool JS_ReportErrorFlagsAndNumber(JSContext *cx, uintN flags,
    JSErrorCallback errorCallback, void *userRef,
    const uintN errorNumber, ...);

JSBool JS_ReportErrorFlagsAndNumberUC(JSContext *cx, uintN flags,
    JSErrorCallback errorCallback, void *userRef,
    const uintN errorNumber, ...);
Name Type Description
cx JSContext * The context in which to report the error. {{wiki.template('Jsapi-requires-request')}}
flags uintN Error report flags.
errorCallback JSErrorCallback
userRef void *
errorNumber const uintN
... ... Additional arguments for the error message. The number and types of these arguments are determined by the errorNumber.

Description

These functions create a JSErrorReport and pass it to the specified JSErrorCallback. They are not very useful to JSAPI applications, because the JSAPI does not expose any error numbers. (???)

{{template.LXRSearch("ident", "i", "JS_ReportErrorNumber")}}
{{template.LXRSearch("ident", "i", "JS_ReportErrorNumberUC")}}
{{template.LXRSearch("ident", "i", "JS_ReportErrorFlagsAndNumber")}}
{{template.LXRSearch("ident", "i", "JS_ReportErrorFlagsAndNumberUC")}}

Revision Source

<p>{{template.Jsapi_ref_header("JS_ReportErrorNumber")}}
</p>
<h2 name="Syntax"> Syntax </h2>
<pre class="eval">void <b>JS_ReportErrorNumber</b>(<a href="en/JSContext">JSContext</a> *cx, <a href="en/JSErrorCallback">JSErrorCallback</a> errorCallback,
    void *userRef, const <a href="en/UintN">uintN</a> errorNumber, ...);

void <b>JS_ReportErrorNumberUC</b>(<a href="en/JSContext">JSContext</a> *cx, <a href="en/JSErrorCallback">JSErrorCallback</a> errorCallback,
    void *userRef, const <a href="en/UintN">uintN</a> errorNumber, ...);

<a href="en/JSBool">JSBool</a> <b>JS_ReportErrorFlagsAndNumber</b>(<a href="en/JSContext">JSContext</a> *cx, <a href="en/UintN">uintN</a> flags,
    <a href="en/JSErrorCallback">JSErrorCallback</a> errorCallback, void *userRef,
    const <a href="en/UintN">uintN</a> errorNumber, ...);

<a href="en/JSBool">JSBool</a> <b>JS_ReportErrorFlagsAndNumberUC</b>(<a href="en/JSContext">JSContext</a> *cx, <a href="en/UintN">uintN</a> flags,
    <a href="en/JSErrorCallback">JSErrorCallback</a> errorCallback, void *userRef,
    const <a href="en/UintN">uintN</a> errorNumber, ...);
</pre>
<table class="fullwidth-table">
<tbody><tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td><code>cx</code></td>
<td><code><a href="en/JSContext">JSContext</a> *</code></td>
<td>The context in which to report the error.
{{wiki.template('Jsapi-requires-request')}}</td>
</tr>
<tr>
<td><code>flags</code></td>
<td><code><a href="en/UintN">uintN</a></code></td>
<td>Error report flags.</td>
</tr>
<tr>
<td><code>errorCallback</code></td>
<td><code><a href="en/JSErrorCallback">JSErrorCallback</a></code></td>
<td></td>
</tr>
<tr>
<td><code>userRef</code></td>
<td><code>void *</code></td>
<td></td>
</tr>
<tr>
<td><code>errorNumber</code></td>
<td><code>const <a href="en/UintN">uintN</a></code></td>
<td></td>
</tr>
<tr>
<td><code>...</code></td>
<td><code>...</code></td>
<td>Additional arguments for the error message.  The number and types of these arguments are determined by the <code>errorNumber</code>.</td>
</tr>
</tbody></table>
<h2 name="Description"> Description </h2>
<p>These functions create a <code><a href="en/JSErrorReport">JSErrorReport</a></code> and pass it to the specified <code><a href="en/JSErrorCallback">JSErrorCallback</a></code>.  They are not very useful to JSAPI applications, because the JSAPI does not expose any error numbers.  <i>(???)</i>
</p><p>{{template.LXRSearch("ident", "i", "JS_ReportErrorNumber")}}<br>
{{template.LXRSearch("ident", "i", "JS_ReportErrorNumberUC")}}<br>
{{template.LXRSearch("ident", "i", "JS_ReportErrorFlagsAndNumber")}}<br>
{{template.LXRSearch("ident", "i", "JS_ReportErrorFlagsAndNumberUC")}}
</p>
Revert to this revision