Class Exceptions
- java.lang.Object
-
- com.thebuzzmedia.exiftool.commons.exceptions.Exceptions
-
public final class Exceptions extends Object
Static Exceptions Utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RuntimeException
launderThrowable(Throwable t)
Coerce an unchecked Throwable to a RuntimeException: If the Throwable is an Error, throw it. If it is aRuntimeException
return it. Otherwise, throwIllegalStateException
.
-
-
-
Method Detail
-
launderThrowable
public static RuntimeException launderThrowable(Throwable t)
Coerce an unchecked Throwable to a RuntimeException:- If the Throwable is an Error, throw it.
- If it is a
RuntimeException
return it. - Otherwise, throw
IllegalStateException
.
- Parameters:
t
- Original throwable.- Returns:
- Wrapped exception.
-
-