diff -r f9bc8cd4da8f src/org/python/compiler/ProxyMaker.java --- a/src/org/python/compiler/ProxyMaker.java Sat Jun 04 18:02:13 2011 -0700 +++ b/src/org/python/compiler/ProxyMaker.java Wed Aug 24 20:15:13 2011 +0100 @@ -11,10 +11,12 @@ import org.objectweb.asm.Label; import org.objectweb.asm.Opcodes; import org.python.core.Py; +import org.python.core.PyException; import org.python.core.PyMethod; import org.python.core.PyObject; import org.python.core.PyProxy; import org.python.core.PyReflectedFunction; +import org.python.core.PyString; import org.python.util.Generic; public class ProxyMaker implements ClassConstants, Opcodes @@ -518,10 +520,21 @@ callMethod(code, name, parameters, ret, method.getExceptionTypes()); code.label(returnNull); code.pop(); + throwNotImplementedException(code, name); doNullReturn(code, ret); } } + protected static void throwNotImplementedException(Code code, String name) { + code.ldc(name); + code.invokestatic("org/python/compiler/ProxyMaker", "throwNotImplementedException", "(Ljava/lang/String;)V"); + } + + public static void throwNotImplementedException(String name) throws PyException { + String msg = "abstract method \"" + name + "\" not implemented"; + throw new PyException(Py.AttributeError, new PyString(msg)); + } + private String methodString(Method m) { StringBuffer buf = new StringBuffer(m.getName()); buf.append(":");