Class ExceptionUtils
java.lang.Object
com.thanlinardos.spring_enterprise_library.error.utils.ExceptionUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetStackTrace(Throwable throwable) Gets the stack trace from a Throwable as a String, including suppressed and cause exceptions.
-
Constructor Details
-
ExceptionUtils
public ExceptionUtils()
-
-
Method Details
-
getStackTrace
Gets the stack trace from a Throwable as a String, including suppressed and cause exceptions.The result of this method vary by JDK version as this method uses
Throwable.printStackTrace(java.io.PrintWriter).- Parameters:
throwable- theThrowableto be examined, may be null- Returns:
- the stack trace as generated by the exception's
printStackTrace(PrintWriter)method, or an empty String ifnullinput.
-