Package io.quarkus.runtime.util
Class ExceptionUtil
java.lang.Object
io.quarkus.runtime.util.ExceptionUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateStackTrace(Throwable exception) Returns the string representation of the stacktrace of the passedexceptionstatic ThrowablegetRootCause(Throwable exception) static <T> booleanisAnyCauseInstanceOf(Throwable exception, Class<T> classToCheck) static StringrootCauseFirstStackTrace(Throwable exception) Returns an "upside down" stacktrace of theexceptionwith the root cause showing up first in the stacktrace.
-
Constructor Details
-
ExceptionUtil
public ExceptionUtil()
-
-
Method Details
-
generateStackTrace
Returns the string representation of the stacktrace of the passedexception- Parameters:
exception-- Returns:
-
rootCauseFirstStackTrace
Returns an "upside down" stacktrace of theexceptionwith the root cause showing up first in the stacktrace. Note: This is a relatively expensive method because it creates additional exceptions and manipulates their stacktrace. Care should be taken to determine whether usage of this method is necessary.- Parameters:
exception- The exception- Returns:
-
getRootCause
-
isAnyCauseInstanceOf
-