@@ -1452,7 +1452,7 @@ Error BindingsGenerator::_populate_method_icalls_table(const TypeInterface &p_it
1452
1452
}
1453
1453
1454
1454
const TypeInterface *return_type = _get_type_or_null (imethod.return_type );
1455
- ERR_FAIL_NULL_V (return_type, ERR_BUG); // Return type not found
1455
+ ERR_FAIL_NULL_V_MSG (return_type, ERR_BUG, " Return type ' " + imethod. return_type . cname + " ' was not found. " );
1456
1456
1457
1457
String im_unique_sig = get_ret_unique_sig (return_type) + " ,CallMethodBind" ;
1458
1458
@@ -1463,7 +1463,7 @@ Error BindingsGenerator::_populate_method_icalls_table(const TypeInterface &p_it
1463
1463
// Get arguments information
1464
1464
for (const ArgumentInterface &iarg : imethod.arguments ) {
1465
1465
const TypeInterface *arg_type = _get_type_or_null (iarg.type );
1466
- ERR_FAIL_NULL_V (arg_type, ERR_BUG); // Argument type not found
1466
+ ERR_FAIL_NULL_V_MSG (arg_type, ERR_BUG, " Argument type ' " + iarg. type . cname + " ' was not found. " );
1467
1467
1468
1468
im_unique_sig += " ," ;
1469
1469
im_unique_sig += get_arg_unique_sig (*arg_type);
@@ -2313,7 +2313,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
2313
2313
const ArgumentInterface &iarg = *itr;
2314
2314
2315
2315
const TypeInterface *arg_type = _get_type_or_null (iarg.type );
2316
- ERR_FAIL_NULL_V (arg_type, ERR_BUG); // Argument type not found
2316
+ ERR_FAIL_NULL_V_MSG (arg_type, ERR_BUG, " Argument type ' " + iarg. type . cname + " ' was not found. " );
2317
2317
2318
2318
if (i != 0 ) {
2319
2319
output << " , " ;
@@ -2333,7 +2333,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
2333
2333
2334
2334
if (imethod.return_type .cname != name_cache.type_void ) {
2335
2335
const TypeInterface *return_type = _get_type_or_null (imethod.return_type );
2336
- ERR_FAIL_NULL_V (return_type, ERR_BUG); // Return type not found
2336
+ ERR_FAIL_NULL_V_MSG (return_type, ERR_BUG, " Return type ' " + imethod. return_type . cname + " ' was not found. " );
2337
2337
2338
2338
output << INDENT3 " ret = "
2339
2339
<< sformat (return_type->cs_managed_to_variant , " callRet" , return_type->cs_type , return_type->name )
@@ -2552,7 +2552,7 @@ Error BindingsGenerator::_generate_cs_property(const BindingsGenerator::TypeInte
2552
2552
const TypeReference &proptype_name = getter ? getter->return_type : setter->arguments .back ()->get ().type ;
2553
2553
2554
2554
const TypeInterface *prop_itype = _get_type_or_singleton_or_null (proptype_name);
2555
- ERR_FAIL_NULL_V (prop_itype, ERR_BUG); // Property type not found
2555
+ ERR_FAIL_NULL_V_MSG (prop_itype, ERR_BUG, " Property type ' " + proptype_name. cname + " ' was not found. " );
2556
2556
2557
2557
ERR_FAIL_COND_V_MSG (prop_itype->is_singleton , ERR_BUG,
2558
2558
" Property type is a singleton: '" + p_itype.name + " ." + String (p_iprop.cname ) + " '." );
@@ -2651,7 +2651,7 @@ Error BindingsGenerator::_generate_cs_property(const BindingsGenerator::TypeInte
2651
2651
2652
2652
Error BindingsGenerator::_generate_cs_method (const BindingsGenerator::TypeInterface &p_itype, const BindingsGenerator::MethodInterface &p_imethod, int &p_method_bind_count, StringBuilder &p_output) {
2653
2653
const TypeInterface *return_type = _get_type_or_singleton_or_null (p_imethod.return_type );
2654
- ERR_FAIL_NULL_V (return_type, ERR_BUG); // Return type not found
2654
+ ERR_FAIL_NULL_V_MSG (return_type, ERR_BUG, " Return type ' " + p_imethod. return_type . cname + " ' was not found. " );
2655
2655
2656
2656
ERR_FAIL_COND_V_MSG (return_type->is_singleton , ERR_BUG,
2657
2657
" Method return type is a singleton: '" + p_itype.name + " ." + p_imethod.name + " '." );
@@ -2690,7 +2690,7 @@ Error BindingsGenerator::_generate_cs_method(const BindingsGenerator::TypeInterf
2690
2690
const ArgumentInterface &first = p_imethod.arguments .front ()->get ();
2691
2691
for (const ArgumentInterface &iarg : p_imethod.arguments ) {
2692
2692
const TypeInterface *arg_type = _get_type_or_singleton_or_null (iarg.type );
2693
- ERR_FAIL_NULL_V (arg_type, ERR_BUG); // Argument type not found
2693
+ ERR_FAIL_NULL_V_MSG (arg_type, ERR_BUG, " Argument type ' " + iarg. type . cname + " ' was not found. " );
2694
2694
2695
2695
ERR_FAIL_COND_V_MSG (arg_type->is_singleton , ERR_BUG,
2696
2696
" Argument type is a singleton: '" + iarg.name + " ' of method '" + p_itype.name + " ." + p_imethod.name + " '." );
@@ -2944,7 +2944,7 @@ Error BindingsGenerator::_generate_cs_signal(const BindingsGenerator::TypeInterf
2944
2944
const ArgumentInterface &first = p_isignal.arguments .front ()->get ();
2945
2945
for (const ArgumentInterface &iarg : p_isignal.arguments ) {
2946
2946
const TypeInterface *arg_type = _get_type_or_singleton_or_null (iarg.type );
2947
- ERR_FAIL_NULL_V (arg_type, ERR_BUG); // Argument type not found
2947
+ ERR_FAIL_NULL_V_MSG (arg_type, ERR_BUG, " Argument type ' " + iarg. type . cname + " ' was not found. " );
2948
2948
2949
2949
ERR_FAIL_COND_V_MSG (arg_type->is_singleton , ERR_BUG,
2950
2950
" Argument type is a singleton: '" + iarg.name + " ' of signal '" + p_itype.name + " ." + p_isignal.name + " '." );
@@ -3013,7 +3013,7 @@ Error BindingsGenerator::_generate_cs_signal(const BindingsGenerator::TypeInterf
3013
3013
int idx = 0 ;
3014
3014
for (const ArgumentInterface &iarg : p_isignal.arguments ) {
3015
3015
const TypeInterface *arg_type = _get_type_or_null (iarg.type );
3016
- ERR_FAIL_NULL_V (arg_type, ERR_BUG); // Argument type not found
3016
+ ERR_FAIL_NULL_V_MSG (arg_type, ERR_BUG, " Argument type ' " + iarg. type . cname + " ' was not found. " );
3017
3017
3018
3018
if (idx != 0 ) {
3019
3019
p_output << " , " ;
@@ -3113,7 +3113,7 @@ Error BindingsGenerator::_generate_cs_native_calls(const InternalCall &p_icall,
3113
3113
bool ret_void = p_icall.return_type .cname == name_cache.type_void ;
3114
3114
3115
3115
const TypeInterface *return_type = _get_type_or_null (p_icall.return_type );
3116
- ERR_FAIL_NULL_V (return_type, ERR_BUG); // Return type not found
3116
+ ERR_FAIL_NULL_V_MSG (return_type, ERR_BUG, " Return type ' " + p_icall. return_type . cname + " ' was not found. " );
3117
3117
3118
3118
StringBuilder c_func_sig;
3119
3119
StringBuilder c_in_statements;
@@ -3129,7 +3129,7 @@ Error BindingsGenerator::_generate_cs_native_calls(const InternalCall &p_icall,
3129
3129
int i = 0 ;
3130
3130
for (const TypeReference &arg_type_ref : p_icall.argument_types ) {
3131
3131
const TypeInterface *arg_type = _get_type_or_null (arg_type_ref);
3132
- ERR_FAIL_NULL_V (arg_type, ERR_BUG); // Return type not found
3132
+ ERR_FAIL_NULL_V_MSG (arg_type, ERR_BUG, " Argument type ' " + arg_type_ref. cname + " ' was not found. " );
3133
3133
3134
3134
String c_param_name = " arg" + itos (i + 1 );
3135
3135
@@ -3389,7 +3389,7 @@ const String BindingsGenerator::_get_generic_type_parameters(const TypeInterface
3389
3389
String params = " <" ;
3390
3390
for (const TypeReference ¶m_type : p_generic_type_parameters) {
3391
3391
const TypeInterface *param_itype = _get_type_or_singleton_or_null (param_type);
3392
- ERR_FAIL_NULL_V (param_itype, " " ); // Parameter type not found
3392
+ ERR_FAIL_NULL_V_MSG (param_itype, " " , " Parameter type ' " + param_type. cname + " ' was not found. " );
3393
3393
3394
3394
ERR_FAIL_COND_V_MSG (param_itype->is_singleton , " " ,
3395
3395
" Generic type parameter is a singleton: '" + param_itype->name + " '." );
0 commit comments