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.
36 lines
721 B
36 lines
721 B
name: duk_push_error_object_va
|
|
|
|
proto: |
|
|
duk_idx_t duk_push_error_object_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_push_error_object">duk_push_error_object()</a></code>.</p>
|
|
|
|
<div include="vararg-portability.html" />
|
|
|
|
example: |
|
|
duk_idx_t my_type_error(duk_context *ctx, const char *fmt, ...) {
|
|
va_list ap;
|
|
duk_idx_t err_idx;
|
|
|
|
va_start(ap, fmt);
|
|
err_idx = duk_push_error_object_va(ctx, DUK_ERR_TYPE_ERROR, fmt, ap);
|
|
va_end(ap);
|
|
|
|
return err_idx;
|
|
}
|
|
|
|
tags:
|
|
- stack
|
|
- object
|
|
- error
|
|
- vararg
|
|
|
|
seealso:
|
|
- duk_push_error_object
|
|
|
|
introduced: 1.1.0
|
|
|