MCPcopy Create free account
hub / github.com/buke/quickjs-go / js_dump_obj

Function js_dump_obj

deps/quickjs/quickjs-libc.c:4710–4721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4708}
4709
4710static void js_dump_obj(JSContext *ctx, FILE *f, JSValueConst val)
4711{
4712 const char *str;
4713
4714 str = JS_ToCString(ctx, val);
4715 if (str) {
4716 fprintf(f, "%s\n", str);
4717 JS_FreeCString(ctx, str);
4718 } else {
4719 fprintf(f, "[exception]\n");
4720 }
4721}
4722
4723#define JS_DUMP_ERROR_MAX_CAUSE_DEPTH 10
4724

Callers 1

js_std_dump_error1Function · 0.85

Calls 1

JS_ToCStringFunction · 0.85

Tested by

no test coverage detected