[gjs] gjs_string_to_intarray: throw if we can't handle the integer type



commit 6ae3e271003afffff4eed712c05a5ccfb022dc23
Author: Havoc Pennington <hp pobox com>
Date:   Wed May 13 18:49:12 2009 -0400

    gjs_string_to_intarray: throw if we can't handle the integer type
---
 gi/arg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/gi/arg.c b/gi/arg.c
index 74a98eb..8418dab 100644
--- a/gi/arg.c
+++ b/gi/arg.c
@@ -272,6 +272,8 @@ gjs_string_to_intarray(JSContext   *context,
 
     default:
         // can't convert a string to this type.
+        gjs_throw(context, "Cannot convert string to type '%s'",
+                  g_base_info_get_name((GIBaseInfo*) param_info));
         return JS_FALSE;
     }
 }



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