Files
why3/bench/java/expected/ExceptionThrow.java

25 lines
559 B
Java
Raw Permalink Normal View History

2022-05-13 10:53:00 +02:00
/* This file has been extracted from module ExceptionThrow. */
import java.util.NoSuchElementException;
public class ExceptionThrow {
public static int func(int i) throws IndexOutOfBoundsException,
NoSuchElementException, Exception1, Exception2 {
if (i == 0) {
throw new Exception1(i);
}
if (i == 1) {
throw new Exception2(i);
}
if (i == 2) {
throw new IndexOutOfBoundsException ();
}
if (i == 3) {
throw new NoSuchElementException ();
}
return i;
}
}