Package com.smeup.kokos.sdk.util
Class ExceptionUtils
java.lang.Object
com.smeup.kokos.sdk.util.ExceptionUtils
This class contains all exception util methods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconcatenateAllCause(Throwable throwable) Concatenate all cause of a Throwable into a single-line message.static ThrowablegetRootCause(Throwable throwable) Return the root cause of an exception
-
Constructor Details
-
ExceptionUtils
public ExceptionUtils()
-
-
Method Details
-
getRootCause
Return the root cause of an exception- Parameters:
throwable-- Returns:
-
concatenateAllCause
Concatenate all cause of a Throwable into a single-line message. Nested causes are appended with": "so the result stays readable when serialized in JSON (no embedded newlines).- Parameters:
throwable- the exception- Returns:
- full message
-