name: duk_pnew proto: | duk_ret_t duk_pnew(duk_context *ctx, duk_idx_t nargs); stack: | [ ... constructor! arg1! ...! argN! ] -> [ ... retval! ] (if success, return value == 0) [ ... constructor! arg1! ...! argN! ] -> [ ... err! ] (if failure, return value != 0) summary: |
Like duk_new()
but catches errors.
A zero return value indicates success and the constructor result is left on
the stack top. A non-zero return value indicates an error, and the error
is left on the stack top.