be more helpful when raising rb_eTypeError in string_arr string_arr_new(VALUE rb_stri...
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Wed, 13 Jun 2007 16:51:06 +0000 (16:51 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Wed, 13 Jun 2007 16:51:06 +0000 (16:51 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1118 a5681a0c-68f1-0310-ab6d-d61299d08faa

bindings/ruby/main.c

index 32bd8cf..aa082dd 100644 (file)
@@ -49,7 +49,7 @@ string_arr string_arr_new(
             a.strings[i + 1] = strdup(buf);
             break;
         default:
-            rb_raise(rb_eTypeError, "invalid argument");
+            rb_raise(rb_eTypeError, "invalid argument - %s, expected T_STRING or T_FIXNUM on index %d", rb_class2name(CLASS_OF(v)), i);
             break;
         }
     }