name: duk_generic_error proto: | duk_ret_t duk_generic_error(duk_context *ctx, const char *fmt, ...); stack: | [ ... ] -> [ ... err! ] summary: |

Convenience API call, equivalent to duk_error() with an error code DUK_ERR_ERROR.

example: | return duk_generic_error(ctx, "my error: %d", (int) argval); tags: - error seealso: - duk_error introduced: 2.0.0