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

Function decodeException

tsn/src/test262/runner/main.cpp:61–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61static void decodeException(JSContext* ctx, std::string& errorType, std::string& errorDescription) {
62 JSValue exception_val;
63 exception_val = tsn_get_exception(ctx);
64 if (tsn_is_error(ctx, exception_val)) {
65 auto val = tsn_get_error_type(ctx, exception_val);
66 errorType = tsn_to_cstring(ctx, val);
67 val = tsn_get_error_description(ctx, exception_val);
68 errorDescription = tsn_to_cstring(ctx, val);
69 } else {
70 errorType = "Unknown";
71 errorDescription = "No Exception Found";
72 }
73 tsn_release(ctx, exception_val);
74}
75
76class realm {
77public:

Callers 2

evaluateHarnessMethod · 0.85
evaluateCompiledTestMethod · 0.85

Calls 6

tsn_get_exceptionFunction · 0.85
tsn_is_errorFunction · 0.85
tsn_get_error_typeFunction · 0.85
tsn_to_cstringFunction · 0.85
tsn_releaseFunction · 0.85

Tested by

no test coverage detected