better logging for compiling

This commit is contained in:
2026-02-25 16:05:37 -06:00
parent d0bf757d91
commit adcaa92bea
7 changed files with 237 additions and 23 deletions

View File

@@ -3277,7 +3277,8 @@ JS_RaiseDisrupt (JSContext *ctx, const char *fmt, ...) {
va_start (ap, fmt);
vsnprintf (buf, sizeof (buf), fmt, ap);
va_end (ap);
JS_Log (ctx, "error", "%s", buf);
if (ctx->log_callback)
JS_Log (ctx, "error", "%s", buf);
ctx->current_exception = JS_TRUE;
return JS_EXCEPTION;
}