Files
legado/epublib/src/main/java/me/ag2s/utils/ThrowableUtils.java
ag2s20150909 36c4e9e685 优化
2022-04-07 22:05:58 +08:00

17 lines
383 B
Java

package me.ag2s.utils;
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;
}
}