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)
| 180 | */ |
| 181 | // NOLINTNEXTLINE(modernize-avoid-variadic-functions) |
| 182 | void 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: |
no test coverage detected