[njs] QuickJS: fixed exception handling in shell output.

noreply at nginx.com noreply at nginx.com
Fri Aug 16 01:36:02 UTC 2024


details:   https://github.com/nginx/njs/commit/4b8188857b4385b5d2aff44cb548e92521c6c91f
branches:  master
commit:    4b8188857b4385b5d2aff44cb548e92521c6c91f
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Tue, 13 Aug 2024 17:14:14 -0700
description:
QuickJS: fixed exception handling in shell output.


---
 external/njs_shell.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/external/njs_shell.c b/external/njs_shell.c
index 672215c1..ec2a3875 100644
--- a/external/njs_shell.c
+++ b/external/njs_shell.c
@@ -2108,6 +2108,7 @@ njs_qjs_njs_getter(JSContext *ctx, JSValueConst this_val)
 
 
 static njs_int_t njs_qjs_global_init(JSContext *ctx, JSValue global_obj);
+static void njs_qjs_dump_error(JSContext *ctx);
 
 
 static void
@@ -2126,7 +2127,7 @@ njs_qjs_dump_obj(JSContext *ctx, FILE *f, JSValueConst val, const char *prefix,
         JS_FreeCString(ctx, str);
 
     } else {
-        fprintf(f, "%s[exception]\n", prefix);
+        njs_qjs_dump_error(ctx);
     }
 }
 


More information about the nginx-devel mailing list