diff options
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/resolve.cc | 22 |
2 files changed, 24 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 6ff59e6..7a56c40 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2004-04-01 Gary Benson <gbenson@redhat.com> + + * resolve.cc (_Jv_ResolvePoolEntry): Put field name in exception. + (_Jv_SearchMethodInClass): Likewise. + 2004-03-26 Peter Moon <peterm@miraculum.com> * java/text/NumberFormat.java: Fix spelling of setCurrency diff --git a/libjava/resolve.cc b/libjava/resolve.cc index d71e125..5a859a7 100644 --- a/libjava/resolve.cc +++ b/libjava/resolve.cc @@ -1,6 +1,6 @@ // resolve.cc - Code for linking and resolving classes and pool entries. -/* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation +/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation This file is part of libgcj. @@ -185,7 +185,14 @@ _Jv_ResolvePoolEntry (jclass klass, int index) } else { - throw new java::lang::IllegalAccessError; + java::lang::StringBuffer *sb + = new java::lang::StringBuffer (); + sb->append(klass->getName()); + sb->append(JvNewStringLatin1(": ")); + sb->append(cls->getName()); + sb->append(JvNewStringLatin1(".")); + sb->append(_Jv_NewStringUtf8Const (field_name)); + throw new java::lang::IllegalAccessError(sb->toString()); } } } @@ -343,7 +350,16 @@ _Jv_SearchMethodInClass (jclass cls, jclass klass, if (_Jv_CheckAccess (klass, cls, method->accflags)) return method; else - throw new java::lang::IllegalAccessError; + { + java::lang::StringBuffer *sb = new java::lang::StringBuffer(); + sb->append(klass->getName()); + sb->append(JvNewStringLatin1(": ")); + sb->append(cls->getName()); + sb->append(JvNewStringLatin1(".")); + sb->append(_Jv_NewStringUTF(method_name->data)); + sb->append(_Jv_NewStringUTF(method_signature->data)); + throw new java::lang::IllegalAccessError (sb->toString()); + } } return 0; } |