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

Function throw_invalid_interface_argument

gi/arg.cpp:1010–1022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1008}
1009
1010GJS_JSAPI_RETURN_CONVENTION
1011static bool throw_invalid_interface_argument(JSContext* cx,
1012 JS::HandleValue value,
1013 const GI::BaseInfo& interface_info,
1014 const char* arg_name,
1015 GjsArgumentType arg_type) {
1016 Gjs::AutoChar display_name{gjs_argument_display_name(arg_name, arg_type)};
1017
1018 gjs_throw(cx, "Expected type %s for %s but got type '%s'",
1019 interface_info.type_string(), display_name.get(),
1020 JS::InformalValueTypeName(value));
1021 return false;
1022}
1023
1024bool gjs_array_to_basic_explicit_array(
1025 JSContext* cx, JS::HandleValue value, GITypeTag element_tag,

Calls 4

gjs_throwFunction · 0.85
type_stringMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected