diff --git a/website/guide/compiling.html b/website/guide/compiling.html index 5e78db97..18eb9946 100644 --- a/website/guide/compiling.html +++ b/website/guide/compiling.html @@ -186,6 +186,10 @@ The table below summarizes the available options, in no particular order:
features depending on it.abort()
or exit()
. This is useful when debugging
@@ -292,7 +296,7 @@ you can easily create inconsistent DUK_USE_xxx
flags, the
customization header will be version specific, and you need to peek into
Duktape internals to know what defines to tweak.
-The default panic handler will print an error message to stdout
unless I/O is disabled by DUK_OPT_NO_FILE_IO
. It will then call
@@ -300,15 +304,15 @@ unless I/O is disabled by DUK_OPT_NO_FILE_IO
. It will then call
DUK_OPT_SEGFAULT_ON_PANIC
is defined.
You can override the entire panic handler by defining
-DUK_PANIC_HANDLER
. For example, you could add the
+DUK_OPT_PANIC_HANDLER
. For example, you could add the
following to your compiler options:
-'-DDUK_PANIC_HANDLER(code,msg)={printf("*** %d:%s\n",(code),(msg));abort();}' +'-DDUK_OPT_PANIC_HANDLER(code,msg)={printf("*** %d:%s\n",(code),(msg));abort();}'
Or perhaps:
-'-DDUK_PANIC_HANDLER(code,msg)={my_panic_handler((code),(msg))}' +'-DDUK_OPT_PANIC_HANDLER(code,msg)={my_panic_handler((code),(msg))}'
which calls your custom handler: