]> git.kaiwu.me - njs.git/commit
Improved error messages for module loading failures.
authorDmitry Volyntsev <xeioex@nginx.com>
Sat, 19 Oct 2024 01:24:49 +0000 (18:24 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Tue, 22 Oct 2024 01:06:48 +0000 (18:06 -0700)
commited36e94242de38e88a6cc536404609fc72bf6456
treeaa6c3bd74b6098320b1ac214412ceec2cf48080d
parent1b2a339162817da195a3d8e631b61233c1aa57f0
Improved error messages for module loading failures.

There are several reasons why a file cannot be opened. Without
extra information, especially in containerized environments, these
problems are difficult to debug. Adding errno status to the
error output helps identify the root cause.

Additionally, error messages are now aligned between njs and QuickJS.
nginx/ngx_js.c
nginx/ngx_js.h
src/njs.h
src/njs_module.c
src/njs_parser.c
src/test/njs_unit_test.c
test/shell_test_njs.exp