diff options
author | Gary Benson <gbenson@redhat.com> | 2004-04-01 17:07:03 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2004-04-01 17:07:03 +0000 |
commit | 1c19eaccf2f1a4f1471561aed1d333f058908bd3 (patch) | |
tree | 1b54b62049e12cdf14031ad62bc2a7ed2f63f61e /libjava | |
parent | 765f1bf9e4451e97ccfba21bc2d9dcee8580fb31 (diff) | |
download | gcc-1c19eaccf2f1a4f1471561aed1d333f058908bd3.zip gcc-1c19eaccf2f1a4f1471561aed1d333f058908bd3.tar.gz gcc-1c19eaccf2f1a4f1471561aed1d333f058908bd3.tar.bz2 |
resolve.cc (_Jv_ResolvePoolEntry): Put field name in exception.
2004-04-01 Gary Benson <gbenson@redhat.com>
* resolve.cc (_Jv_ResolvePoolEntry): Put field name in exception.
(_Jv_SearchMethodInClass): Likewise.
From-SVN: r80305
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; } |