Changeset 13365 for trunk/abcl/src/org


Ignore:
Timestamp:
06/28/11 15:28:38 (10 years ago)
Author:
Mark Evenson
Message:

Inform user of missing instance method name.

File:
1 edited

Legend:

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

    r13359 r13365  
    4646import java.lang.reflect.Method;
    4747import java.lang.reflect.Modifier;
     48import java.text.MessageFormat;
    4849import java.util.*;
    4950
     
    862863                method = findMethod(instance, intendedClass, methodName, methodArgs);
    863864                if (method == null) {
     865                    if (intendedClass == null) {
     866                        String msg = MessageFormat.format("No instance method named {0} found for type {1}", methodName, instance.getClass().getName());
     867                        throw new NoSuchMethodException(msg);
     868                    }
    864869                    String classes = intendedClass.getName();
    865870                    Class<?> actualClass = instance.getClass();
Note: See TracChangeset for help on using the changeset viewer.