mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
16
epublib/src/main/java/me/ag2s/utils/ThrowableUtils.java
Normal file
16
epublib/src/main/java/me/ag2s/utils/ThrowableUtils.java
Normal file
@@ -0,0 +1,16 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user