[armedbear-cvs] r12304 - trunk/abcl/src/org/armedbear/lisp
Alessio Stalla
astalla at common-lisp.net
Wed Dec 23 21:04:41 UTC 2009
Author: astalla
Date: Wed Dec 23 16:04:40 2009
New Revision: 12304
Log:
Refinement: better error message when an applicable constructor cannot be found.
Modified:
trunk/abcl/src/org/armedbear/lisp/Java.java
Modified: trunk/abcl/src/org/armedbear/lisp/Java.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Java.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Java.java Wed Dec 23 16:04:40 2009
@@ -745,7 +745,23 @@
}
}
if (result == null) {
- throw new NoSuchMethodException(c.getSimpleName());
+ StringBuilder sb = new StringBuilder(c.getSimpleName());
+ sb.append('(');
+ boolean first = true;
+ for(Object o : javaArgs) {
+ if(first) {
+ first = false;
+ } else {
+ sb.append(", ");
+ }
+ if(o != null) {
+ sb.append(o.getClass().getName());
+ } else {
+ sb.append("<null>");
+ }
+ }
+ sb.append(')');
+ throw new NoSuchMethodException(sb.toString());
}
return result;
}
More information about the armedbear-cvs
mailing list