Package io.quarkus.runtime.util
Class ExceptionUtil
- java.lang.Object
-
- io.quarkus.runtime.util.ExceptionUtil
-
public class ExceptionUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ExceptionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
generateStackTrace(Throwable exception)
Returns the string representation of the stacktrace of the passedexception
static Throwable
getRootCause(Throwable exception)
static String
rootCauseFirstStackTrace(Throwable exception)
Returns an "upside down" stacktrace of theexception
with the root cause showing up first in the stacktrace.
-
-
-
Method Detail
-
generateStackTrace
public static String generateStackTrace(Throwable exception)
Returns the string representation of the stacktrace of the passedexception
- Parameters:
exception
-- Returns:
-
rootCauseFirstStackTrace
public static String rootCauseFirstStackTrace(Throwable exception)
Returns an "upside down" stacktrace of theexception
with 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:
-
-