aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Volyntsev <xeioex@nginx.com>2017-11-17 18:55:07 +0300
committerDmitry Volyntsev <xeioex@nginx.com>2017-11-17 18:55:07 +0300
commit0b877c6dc454ea1e8b436b96ab3046fa14838e9b (patch)
treecd38ae22c2d58b8d5d9ebdb4574a76efa785d027
parent260b7357f95171b4215bd05a5b0fad4d887e8990 (diff)
downloadnjs-0b877c6dc454ea1e8b436b96ab3046fa14838e9b.tar.gz
njs-0b877c6dc454ea1e8b436b96ab3046fa14838e9b.zip
Enabling exception backtraces in nginx modules.
-rw-r--r--nginx/ngx_http_js_module.c1
-rw-r--r--nginx/ngx_stream_js_module.c1
2 files changed, 2 insertions, 0 deletions
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);