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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
// Test a `throw' across a libffi call.
2
 
3
import java.lang.reflect.*;
4
 
5
public class invokethrow
6
{
7
  public static void doit () throws Throwable
8
  {
9
    throw new Throwable ("hi!");
10
  }
11
 
12
  public static void main (String[] args)
13
  {
14
    Class k = invokethrow.class;
15
    try
16
      {
17
        Class[] noargs = new Class[0];
18
        Method m = k.getMethod ("doit", noargs);
19
        m.invoke (null, null);
20
      }
21
    catch (InvocationTargetException x1)
22
      {
23
        System.out.println (x1.getTargetException ().getMessage ());
24
      }
25
    catch (UnsupportedOperationException _)
26
      {
27
        // Some systems don't support invocation, in which case we
28
        // will fake a passing result.
29
        System.out.println ("hi!");
30
      }
31
    catch (Throwable _)
32
      {
33
      }
34
  }
35
}

powered by: WebSVN 2.1.0

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