I just started using Duktape in my C++ framework today, and I've read the entire api without being able to understand how do i catch errors. I found some clues about an error object that is put on the stack However, every time there is an error (like an invalid javascript syntax for example), everything goes crazy and i get a SEGFAULT.
I'm currently evaluating some js lines using the duk_eval function
Here's my lines of code :
duk_push_string(ctx,"pouet");
duk_eval(ctx);
ctx
is the base context that you provide when creating duktape heap
Using try-catch doesn't catch anything
Any idea?
Thanks in advance