name: duk_pcompile proto: | duk_int_t duk_pcompile(duk_context *ctx, duk_uint_t flags); stack: | [ ... source! filename! ] -> [ ... function! ] (if success, return value == 0) [ ... source! filename! ] -> [ ... err! ] (if failure, return value != 0) summary: |
Like duk_compile()
but catches errors
related to compilation (such as syntax errors in the source). A zero return
value indicates success and the compiled function is left on the stack top.
A non-zero return value indicates an error, and the error is left on the stack top.