name: duk_peval_noresult
proto: |
duk_int_t duk_peval_noresult(duk_context *ctx);
stack: |
[ ... source! ] -> [ ... ]
summary: |
Like duk_peval()
but leaves no result
on the value stack (regardless of success/error result).
example: |
duk_push_string(ctx, "print('Hello world!'); syntax error here=");
if (duk_peval_noresult(ctx) != 0) {
printf("eval failed\n");
} else {
printf("eval successful\n");
}
tags:
- compile
- protected
seealso:
- duk_peval_string_noresult
- duk_peval_lstring_noresult
introduced: 1.0.0