Package alluxio.util
Class ExceptionUtils
- java.lang.Object
-
- alluxio.util.ExceptionUtils
-
public final class ExceptionUtils extends java.lang.Object
Utility methods for working with exceptions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
asPlainText(java.lang.Throwable t)
Prints the stacktrace to a string.static boolean
containsInterruptedException(java.lang.Throwable t)
static boolean
isInterrupted(java.lang.Throwable t)
-
-
-
Method Detail
-
containsInterruptedException
public static boolean containsInterruptedException(java.lang.Throwable t)
- Parameters:
t
- a throwable to check- Returns:
- whether the given throwable contains a type of interrupted exception in its causal chain (the causal chain includes the throwable itself)
-
isInterrupted
public static boolean isInterrupted(java.lang.Throwable t)
- Parameters:
t
- a throwable to check- Returns:
- whether the throwable is a type of interrupted exception
-
asPlainText
public static java.lang.String asPlainText(java.lang.Throwable t)
Prints the stacktrace to a string.- Parameters:
t
- the throwable- Returns:
- the formatted trace for the throwable
-
-