Files
legado/book/src/main/java/me/ag2s/base/ThrowableUtils.java
T

17 lines
382 B
Java

package me.ag2s.base;
import androidx.annotation.NonNull;
import java.io.IOException;
public class ThrowableUtils {
public static @NonNull
IOException rethrowAsIOException(Throwable throwable) throws IOException {
IOException newException = new IOException(throwable.getMessage());
newException.initCause(throwable);
throw newException;
}
}