Class ExceptionHelper
java.lang.Object
de.cuioss.test.valueobjects.objects.impl.ExceptionHelper
Helper class used for accessing an exception message in a general way
- Author:
- Oliver Wolff
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
extractCauseMessageFromThrowable
(Throwable throwable) Extracts a message from a given throwable in a safe manner.static String
extractMessageFromThrowable
(Throwable throwable) Extracts a message from a given throwable in a safe manner.
-
Constructor Details
-
ExceptionHelper
public ExceptionHelper()
-
-
Method Details
-
extractMessageFromThrowable
Extracts a message from a given throwable in a safe manner. It specially handlesInvocationTargetException
- Parameters:
throwable
-- Returns:
- the extract message;
-
extractCauseMessageFromThrowable
Extracts a message from a given throwable in a safe manner. It specially handlesInvocationTargetException
- Parameters:
throwable
-- Returns:
- the extract message;
-