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

Function gjs_throw

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

COMPAT: Replace with a format string in C++20. Throws an exception, like "throw new Error(message)" * * If an exception is already set in the context, this will NOT overwrite it. * That's an important semantic since we want the "root cause" exception. To * overwrite, use JS_ClearPendingException() first. */ NOLINTNEXTLINE(modernize-avoid-variadic-functions)

Source from the content-addressed store, hash-verified

167 */
168// NOLINTNEXTLINE(modernize-avoid-variadic-functions)
169void gjs_throw(JSContext* cx, const char* format, ...) {
170 va_list args;
171
172 va_start(args, format);
173 gjs_throw_valist(cx, JSEXN_ERR, nullptr, format, args);
174 va_end(args);
175}
176
177// COMPAT: Replace with a format string in C++20.
178/* Like gjs_throw, but allows to customize the error class and 'name' property.

Callers 15

getFormat_funcFunction · 0.85
getWidth_funcFunction · 0.85
getHeight_funcFunction · 0.85
getStride_funcFunction · 0.85
flush_funcFunction · 0.85
finish_funcFunction · 0.85
getType_funcMethod · 0.85
getDeviceOffset_funcFunction · 0.85
getDeviceScale_funcFunction · 0.85
for_jsMethod · 0.85
surface_to_gi_argumentFunction · 0.85
from_c_ptrMethod · 0.85

Calls 1

gjs_throw_valistFunction · 0.85