Changeset 12304


Ignore:
Timestamp:
12/23/09 21:04:40 (14 years ago)
Author:
astalla
Message:

Refinement: better error message when an applicable constructor cannot be found.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Java.java

    r12303 r12304  
    746746        }
    747747        if (result == null) {
    748             throw new NoSuchMethodException(c.getSimpleName());
     748      StringBuilder sb = new StringBuilder(c.getSimpleName());
     749      sb.append('(');
     750      boolean first = true;
     751      for(Object o : javaArgs) {
     752    if(first) {
     753        first = false;
     754    } else {
     755        sb.append(", ");
     756    }
     757    if(o != null) {
     758        sb.append(o.getClass().getName());
     759    } else {
     760        sb.append("<null>");
     761    }
     762      }
     763      sb.append(')');
     764            throw new NoSuchMethodException(sb.toString());
    749765        }
    750766        return result;
Note: See TracChangeset for help on using the changeset viewer.