robotframework-2.7.7.atest.testresources.testlibs.JavaExceptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robotframework Show documentation
Show all versions of robotframework Show documentation
High level test automation framework
The newest version!
import java.io.IOException;
public class JavaExceptions {
/* base class is java.lang.Error */
public void throwAssertionError(String msg) {
if (msg == null) {
throw new AssertionError();
}
else {
throw new AssertionError(msg);
}
}
/* base class is java.lang.RuntimeException */
public void throwArithmeticException(String msg) {
if (msg == null) {
throw new ArithmeticException();
}
else {
throw new ArithmeticException(msg);
}
}
public void throwRuntimeException(String msg) {
if (msg == null) {
throw new RuntimeException();
}
else {
throw new RuntimeException(msg);
}
}
/* base class is java.lang.Exception */
public void throwIOException(String msg) throws IOException {
if (msg == null) {
throw new IOException();
}
else {
throw new IOException(msg);
}
}
public void throwExitOnFailure() {
throw new FatalCatastrophyException();
}
public void throwExitForLoop() {
throw new ExitForLoopException();
}
}