in hadoop-api-shim/src/main/java/org/apache/hadoop/fs/shim/impl/ShimReflectionSupport.java [83:97]
public static IOException convertUnwrappedExceptionToIOE(final Throwable thrown) {
if (thrown instanceof UncheckedIOException) {
return ((UncheckedIOException) thrown).getCause();
}
if (thrown instanceof RuntimeException) {
throw (RuntimeException) thrown;
}
if (thrown instanceof Error) {
throw (Error) thrown;
}
if (thrown instanceof IOException) {
return (IOException) thrown;
}
return new IOException(thrown);
}