[Kde-bindings] kdebindings/qtruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Mon Jul 26 07:31:07 UTC 2004
CVS commit by rdale:
* The error messages for missing methods or missing constants now give the
name of the missing item.
* For example, this incorrect line:
color_group.setColor( ColorGroup::MyMissingConst, blue )
Gives this error:
splitter.rb:16:in `const_missing': unresolved constant
reference MyMissingConst (ArgumentError)
* Implements suggestion from Jeff on the kdebindings list
CCMAIL: kde-bindings at kde.org
M +17 -0 ChangeLog 1.85
M +11 -3 rubylib/qtruby/Qt.cpp 1.77
--- kdebindings/qtruby/ChangeLog #1.84:1.85
@@ -1,2 +1,19 @@
+2004-07-26 Richard Dale <Richard_Dale at tipitina.demon.co.uk>
+
+ * The error messages for missing methods or missing constants now give the
+ name of the missing item.
+ * For example, this incorrect line:
+
+ color_group.setColor( ColorGroup::MyMissingConst, blue )
+
+ Gives this error:
+
+ splitter.rb:16:in `const_missing': unresolved constant
+ reference MyMissingConst (ArgumentError)
+
+ * Implements suggestion from Jeff on the kdebindings list
+
+ CCMAIL: kde-bindings at kde.org
+
2004-07-19 Richard Dale <Richard_Dale at tipitina.demon.co.uk>
--- kdebindings/qtruby/rubylib/qtruby/Qt.cpp #1.76:1.77
@@ -965,6 +965,10 @@ method_missing(int argc, VALUE * argv, V
free(temp_stack);
// AK - umm.. this is *REALLY* wrong... need to call super.method_missing...
- rb_raise(rb_eArgError, "unresolved method call\n");
- return Qnil;
+ // No I disagree with Alex here, this code is correct! - Richard
+ if (islower(methodName[0])) {
+ rb_raise(rb_eArgError, "unresolved method call %s\n", methodName);
+ } else {
+ rb_raise(rb_eArgError, "unresolved constant reference %s\n", methodName);
+ }
}
}
@@ -1024,5 +1028,9 @@ class_method_missing(int argc, VALUE * a
return result;
} else {
- rb_raise(rb_eArgError, "unresolved method call\n");
+ if (islower(methodName[0])) {
+ rb_raise(rb_eArgError, "unresolved method call %s\n", methodName);
+ } else {
+ rb_raise(rb_eArgError, "unresolved constant reference %s\n", methodName);
+ }
}
}
More information about the Kde-bindings
mailing list