summaryrefslogtreecommitdiffstats
path: root/libjava/java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-29 20:17:02 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-29 20:17:02 +0000
commitaabced569d49fe53b0b43c4d45e8ea1145c955ec (patch)
tree2ce41e7713efb5cba4f1c8e95a4bc6a92548a56d /libjava/java
parent1fd8d5301c7dab38e052121517ea757dcfb63796 (diff)
downloadppe42-gcc-aabced569d49fe53b0b43c4d45e8ea1145c955ec.tar.gz
ppe42-gcc-aabced569d49fe53b0b43c4d45e8ea1145c955ec.zip
* java/lang/natClass.cc (newInstance): Put method name in
exception. (getConstructor): Likewise. (getDeclaredConstructor): Likewise. (getPrivateMethod): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65021 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r--libjava/java/lang/natClass.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc
index 7fea278dbe5..417c059ed59 100644
--- a/libjava/java/lang/natClass.cc
+++ b/libjava/java/lang/natClass.cc
@@ -1,6 +1,6 @@
// natClass.cc - Implementation of java.lang.Class native methods.
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
This file is part of libgcj.
@@ -157,7 +157,7 @@ java::lang::Class::getConstructor (JArray<jclass> *param_types)
return cons;
}
}
- throw new java::lang::NoSuchMethodException;
+ throw new java::lang::NoSuchMethodException (_Jv_NewStringUtf8Const (init_name));
}
JArray<java::lang::reflect::Constructor *> *
@@ -224,7 +224,7 @@ java::lang::Class::getDeclaredConstructor (JArray<jclass> *param_types)
return cons;
}
}
- throw new java::lang::NoSuchMethodException;
+ throw new java::lang::NoSuchMethodException (_Jv_NewStringUtf8Const (init_name));
}
java::lang::reflect::Field *
@@ -707,13 +707,13 @@ java::lang::Class::newInstance (void)
|| isInterface ()
|| isArray ()
|| java::lang::reflect::Modifier::isAbstract(accflags))
- throw new java::lang::InstantiationException;
+ throw new java::lang::InstantiationException (getName ());
_Jv_InitClass (this);
_Jv_Method *meth = _Jv_GetMethodLocal (this, init_name, void_signature);
if (! meth)
- throw new java::lang::NoSuchMethodException;
+ throw new java::lang::NoSuchMethodException (_Jv_NewStringUtf8Const (init_name));
jobject r = JvAllocObject (this);
((void (*) (jobject)) meth->ncode) (r);
@@ -1504,7 +1504,7 @@ java::lang::Class::getPrivateMethod (jstring name, JArray<jclass> *param_types)
}
}
}
- throw new java::lang::NoSuchMethodException;
+ throw new java::lang::NoSuchMethodException (name);
}
// Private accessor method for Java code to retrieve the protection domain.
OpenPOWER on IntegriCloud