From 0b877c6dc454ea1e8b436b96ab3046fa14838e9b Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Fri, 17 Nov 2017 18:55:07 +0300 Subject: [PATCH] Enabling exception backtraces in nginx modules. --- nginx/ngx_http_js_module.c | 1 + nginx/ngx_stream_js_module.c | 1 + 2 files changed, 2 insertions(+) diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index e03c40ae..86c83313 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -1322,6 +1322,7 @@ ngx_http_js_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ngx_memzero(&options, sizeof(njs_vm_opt_t)); options.mcp = mcp; + options.backtrace = 1; options.externals_hash = &externals; jlcf->vm = njs_vm_create(&options); diff --git a/nginx/ngx_stream_js_module.c b/nginx/ngx_stream_js_module.c index a2027492..6acd6e63 100644 --- a/nginx/ngx_stream_js_module.c +++ b/nginx/ngx_stream_js_module.c @@ -1032,6 +1032,7 @@ ngx_stream_js_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ngx_memzero(&options, sizeof(njs_vm_opt_t)); options.mcp = mcp; + options.backtrace = 1; options.externals_hash = &externals; jscf->vm = njs_vm_create(&options); -- 2.47.3