Class ExceptionUtil
- java.lang.Object
-
- com.evolveum.midpoint.schema.util.ExceptionUtil
-
public class ExceptionUtil extends Object
- Author:
- Radovan Semancik
-
-
Constructor Summary
Constructors Constructor Description ExceptionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends Throwable>
TfindCause(Throwable throwable, Class<T> causeClass)
Returns cause of specified type (can be `throwable` parameter itself) or `null`.static Throwable
findRootCause(Throwable throwable)
static CriticalityType
getCriticality(ErrorSelectorType selector, Throwable exception, CriticalityType defaultValue)
static @NotNull ErrorCategoryType
getErrorCategory(Throwable exception)
static LocalizableMessage
getUserFriendlyMessage(Throwable cause)
static boolean
isFatalCriticality(CriticalityType value, CriticalityType defaultValue)
static String
lookForMessage(Throwable e)
static Throwable
lookForTunneledException(Throwable ex)
static String
printStackTrace(Throwable t)
-
-
-
Method Detail
-
getCriticality
public static CriticalityType getCriticality(ErrorSelectorType selector, Throwable exception, CriticalityType defaultValue)
-
getErrorCategory
@NotNull public static @NotNull ErrorCategoryType getErrorCategory(Throwable exception)
-
isFatalCriticality
public static boolean isFatalCriticality(CriticalityType value, CriticalityType defaultValue)
-
getUserFriendlyMessage
public static LocalizableMessage getUserFriendlyMessage(Throwable cause)
-
findCause
public static <T extends Throwable> T findCause(Throwable throwable, Class<T> causeClass)
Returns cause of specified type (can be `throwable` parameter itself) or `null`.
-
-