Files
why3/bench/java/expected/ExceptionThrow.java
2024-10-02 11:28:58 +02:00

25 lines
559 B
Java

/* 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;
}
}