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.
31 lines
557 B
31 lines
557 B
name: duk_error_va
|
|
|
|
proto: |
|
|
void duk_error_va(duk_context *ctx, duk_errcode_t err_code, const char *fmt, va_list ap);
|
|
|
|
stack: |
|
|
[ ... ] -> [ ... err! ]
|
|
|
|
summary: |
|
|
<p>Vararg variant of
|
|
<code><a href="#duk_error">duk_error()</a></code>.</p>
|
|
|
|
example: |
|
|
void my_range_error(duk_context *ctx, const char *fmt, ...) {
|
|
va_list ap;
|
|
|
|
va_start(ap, fmt);
|
|
duk_error_va(ctx, DUK_ERR_RANGE_ERROR, fmt, ap);
|
|
va_end(ap);
|
|
}
|
|
|
|
tags:
|
|
- error
|
|
- vararg
|
|
|
|
seealso:
|
|
- duk_error
|
|
- duk_throw
|
|
- duk_push_error_object
|
|
|
|
introduced: 1.1.0
|
|
|