MCPcopy Create free account
hub / github.com/Snapchat/Valdi / tsn_dump_error1

Function tsn_dump_error1

tsn/src/tsn/tsn.cpp:575–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575static void tsn_dump_error1(tsn_vm* ctx, tsn_value_const exception_val) {
576 tsn_value val;
577 bool is_error;
578
579 is_error = JS_IsError(ctx, exception_val) != 0;
580 tsn_dump_obj(ctx, stderr, exception_val);
581 if (is_error) {
582 val = JS_GetPropertyStr(ctx, exception_val, "stack");
583 if (JS_IsUndefined(val) == 0) {
584 tsn_dump_obj(ctx, stderr, val);
585 }
586 JS_FreeValue(ctx, val);
587 }
588}
589
590bool tsn_has_exception(tsn_vm* ctx) {
591 return JS_HasException_tsn(ctx) != 0;

Callers 1

tsn_dump_errorFunction · 0.85

Calls 3

tsn_dump_objFunction · 0.85
JS_IsUndefinedFunction · 0.85
JS_FreeValueFunction · 0.85

Tested by

no test coverage detected