mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
623 B
32 lines
623 B
name: duk_generic_error_va
|
|
|
|
proto: |
|
|
duk_ret_t duk_generic_error_va(duk_context *ctx, const char *fmt, va_list ap);
|
|
|
|
stack: |
|
|
[ ... ] -> [ ... err! ]
|
|
|
|
summary: |
|
|
<p>Convenience API call, equivalent to
|
|
<code><a href="#duk_error_va">duk_error_va()</a></code> with an error code
|
|
<code>DUK_ERR_ERROR</code>.</p>
|
|
|
|
<div include="vararg-portability.html" />
|
|
|
|
example: |
|
|
void my_generic_error(duk_context *ctx, const char *fmt, ...) {
|
|
va_list ap;
|
|
|
|
va_start(ap, fmt);
|
|
duk_generic_error_va(ctx, fmt, ap);
|
|
va_end(ap);
|
|
}
|
|
|
|
tags:
|
|
- error
|
|
- vararg
|
|
|
|
seealso:
|
|
- duk_error_va
|
|
|
|
introduced: 2.0.0
|
|
|