class RethrowPlain {
@java.lang.SuppressWarnings("all")
void testRethrowAs() {
try {
throw new java.io.FileNotFoundException();
} catch (final java.io.FileNotFoundException $e1) {
throw new java.lang.IllegalArgumentException($e1);
}
}
@java.lang.SuppressWarnings("all")
void testRethrowAsRuntimeException() {
try {
throw new InterruptedException();
} catch (final java.lang.InterruptedException $e1) {
throw new java.lang.RuntimeException($e1);
}
}
@java.lang.SuppressWarnings("all")
void testRethrowEveryExceptionAsSpecifiedException(final String arg) {
try {
if (arg == null) {
throw new java.lang.NullPointerException(java.lang.String.format("The validated object \'%s\' (argument #%s) is null", "arg", 1));
}
if (arg.isEmpty()) {
throw new java.lang.IllegalArgumentException(java.lang.String.format("The validated object \'%s\' (argument #%s) is empty", "arg", 1));
}
System.out.println("code throws all kinds of Exceptions");
} catch (final java.lang.RuntimeException $e1) {
throw $e1;
} catch (final java.lang.Exception $e2) {
throw new java.lang.IllegalArgumentException(java.lang.String.format("meh."), $e2);
}
}
@java.lang.SuppressWarnings("all")
void testFullyCustomizedRethrow(boolean b) {
try {
if (b) {
throw new java.io.FileNotFoundException();
} else {
throw new java.io.IOException();
}
} catch (final java.io.FileNotFoundException $e1) {
throw new java.lang.IllegalArgumentException($e1);
} catch (final java.io.IOException $e2) {
throw new java.lang.RuntimeException($e2);
}
}
@java.lang.SuppressWarnings("all")
void testExceptionsInSanitizeAlsoGetRethrown(final String arg) {
try {
final String sanitizedArg = filterArg(arg);
System.out.println("code throws all kinds of Exceptions");
} catch (final java.lang.RuntimeException $e1) {
throw $e1;
} catch (final java.lang.Exception $e2) {
throw new java.lang.IllegalArgumentException(java.lang.String.format("%s meh.", arg), $e2);
}
}
String filterArg(final String arg) throws Exception {
throw new Exception();
}
}