[perl-Glib-Object-Introspection] Improve an error message



commit 5d439139b122e203128470995cbec03d49c367f6
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sun Aug 8 19:00:02 2010 +0200

    Improve an error message
    
    Say which mandatory argument cannot take undef.

 GObjectIntrospection.xs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/GObjectIntrospection.xs b/GObjectIntrospection.xs
index 7a9d8c9..ddf0485 100644
--- a/GObjectIntrospection.xs
+++ b/GObjectIntrospection.xs
@@ -824,7 +824,8 @@ sv_to_arg (SV * sv,
 	if (!sv || !SvOK (sv))
 		/* Interfaces need to be able to handle undef separately. */
 		if (!may_be_null && tag != GI_TYPE_TAG_INTERFACE)
-			croak ("undefined value for a mandatory argument encountered");
+			croak ("undefined value for mandatory argument '%s' encountered",
+			       g_base_info_get_name ((GIBaseInfo *) arg_info));
 
 	switch (tag) {
 	    case GI_TYPE_TAG_VOID:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]