OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.jni/] [throwit.java] - Blame information for rev 765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
// Test to see if throw works.
2
 
3
public class throwit
4
{
5
  static
6
  {
7
    System.loadLibrary ("throwit");
8
  }
9
 
10
  public static native void throwit (String name, boolean is_new);
11
 
12
  public static void main (String[] args)
13
  {
14
    try
15
      {
16
        throwit ("java/lang/UnknownError", false);
17
      }
18
    catch (Throwable x)
19
      {
20
        System.out.println (x.getClass ());
21
        System.out.println (x.getMessage ());
22
      }
23
    try
24
      {
25
        throwit ("java/lang/Throwable", true);
26
      }
27
    catch (Throwable x)
28
      {
29
        System.out.println (x.getClass ());
30
        System.out.println (x.getMessage ());
31
      }
32
  }
33
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.