From: Dmitry Volyntsev Date: Thu, 22 Jun 2017 15:52:47 +0000 (+0300) Subject: Log error message if VM creation failed. X-Git-Tag: 0.1.11~5 X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=f57d05aa3dac5cd7623a5cd2fbd3f2907c4b56e7;p=njs.git Log error message if VM creation failed. --- diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index b2e84481..cfe83d80 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -1323,6 +1323,7 @@ ngx_http_js_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) jlcf->vm = njs_vm_create(mcp, &shared, &externals); if (jlcf->vm == NULL) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "failed to create JS VM"); return NGX_CONF_ERROR; } diff --git a/nginx/ngx_stream_js_module.c b/nginx/ngx_stream_js_module.c index e28888c3..8be73f3e 100644 --- a/nginx/ngx_stream_js_module.c +++ b/nginx/ngx_stream_js_module.c @@ -1033,6 +1033,7 @@ ngx_stream_js_include(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) jscf->vm = njs_vm_create(mcp, &shared, &externals); if (jscf->vm == NULL) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "failed to create JS VM"); return NGX_CONF_ERROR; }