MCPcopy Create free account
hub / github.com/GNOME/gjs / gjs_throw_custom

Function gjs_throw_custom

gjs/jsapi-util-error.cpp:182–189  ·  view source on GitHub ↗

COMPAT: Replace with a format string in C++20. Like gjs_throw, but allows to customize the error class and 'name' property. * Mainly used for throwing TypeError instead of error. */ NOLINTNEXTLINE(modernize-avoid-variadic-functions)

Source from the content-addressed store, hash-verified

180 */
181// NOLINTNEXTLINE(modernize-avoid-variadic-functions)
182void gjs_throw_custom(JSContext* cx, JSExnType kind, const char* error_name,
183 const char* format, ...) {
184 va_list args;
185
186 va_start(args, format);
187 gjs_throw_valist(cx, kind, error_name, format, args);
188 va_end(args);
189}
190
191/**
192 * gjs_throw_literal:

Callers 13

gjs_typecheck_paramFunction · 0.85
for_js_typecheckMethod · 0.85
typecheckMethod · 0.85
c_value_to_js_checkedFunction · 0.85
do_importFunction · 0.85
gjs_uri_objectFunction · 0.85
load_async_callbackFunction · 0.85
gjs_typecheck_instanceFunction · 0.85

Calls 1

gjs_throw_valistFunction · 0.85

Tested by

no test coverage detected