diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-16 22:39:36 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-02-16 22:39:36 +0000 |
commit | 8eb68c82c5ba7aecda4103e377f677345750d654 (patch) | |
tree | 749456485a5c02cd5067b92fbfbf8829ed248eff /libjava/testsuite/libjava.jni/throwit.java | |
parent | 1b48dfaf195de2702eda8bc4d8848cba85c88053 (diff) | |
download | ppe42-gcc-8eb68c82c5ba7aecda4103e377f677345750d654.tar.gz ppe42-gcc-8eb68c82c5ba7aecda4103e377f677345750d654.zip |
* libjava.jni/throwit.java: New file.
* libjava.jni/throwit.c: New file.
* libjava.jni/throwit.out: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32016 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/testsuite/libjava.jni/throwit.java')
-rw-r--r-- | libjava/testsuite/libjava.jni/throwit.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.jni/throwit.java b/libjava/testsuite/libjava.jni/throwit.java new file mode 100644 index 00000000000..459622d390f --- /dev/null +++ b/libjava/testsuite/libjava.jni/throwit.java @@ -0,0 +1,33 @@ +// Test to see if throw works. + +public class throwit +{ + static + { + System.loadLibrary ("throwit"); + } + + public static native void throwit (String name, boolean is_new); + + public static void main (String[] args) + { + try + { + throwit ("java/lang/UnknownError", false); + } + catch (Throwable x) + { + System.out.println (x.getClass ()); + System.out.println (x.getMessage ()); + } + try + { + throwit ("java/lang/Throwable", true); + } + catch (Throwable x) + { + System.out.println (x.getClass ()); + System.out.println (x.getMessage ()); + } + } +} |