This commit is contained in:
ag2s20150909
2022-04-07 22:05:58 +08:00
parent 7ef57c03b9
commit 36c4e9e685
7 changed files with 179 additions and 101 deletions

View 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;
}
}