[BC] Patch: FYI: better error message

Tom Tromey tromey@redhat.com
Wed Oct 6 00:05:00 GMT 2004


This improves an error message from the linker when it can't find a
method, by including the method's signature.  This is handy when there
is overloading.

A little BC branch status: I've been playing with Eclipse 3.  Merging
over the trunk's URL.java fixed some of the problems I was seeing --
I'm not planning to check this in as we're planning a full merge.

The next problem seems to be that defineclass.cc sets the class' state
to "loaded", but this is incorrect since the requirements for this
state haven't been met.  I'll fix this tomorrow.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* link.cc (resolve_pool_entry): Add signature info to missing
	method's information.

Index: link.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Attic/link.cc,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 link.cc
--- link.cc 29 Sep 2004 21:13:22 -0000 1.1.2.1
+++ link.cc 6 Oct 2004 00:02:32 -0000
@@ -331,6 +331,8 @@
 	    sb->append(owner->getName());
 	    sb->append(JvNewStringLatin1("."));
 	    sb->append(_Jv_NewStringUTF(method_name->data));
+	    sb->append(JvNewStringLatin1(" with signature "));
+	    sb->append(_Jv_NewStringUTF(method_signature->data));
 	    sb->append(JvNewStringLatin1(" was not found."));
 	    throw new java::lang::NoSuchMethodError (sb->toString());
 	  }



More information about the Java-patches mailing list