public class ExceptionUtils
extends java.lang.Object
Constructor and Description |
---|
ExceptionUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getFilteredStackTrace(java.lang.Throwable t)
Simple util to get stack trace.
|
static java.lang.String |
getStackTrace(java.lang.Throwable t)
Get the full stacktrace as a string
|
static java.lang.String |
trimMessage(java.lang.String trace)
Utility method to trim the message from a stack trace
string.
|
public static java.lang.String getFilteredStackTrace(java.lang.Throwable t)
This will unwrap a TikaException and return the cause if not null
NOTE: If your stacktraces are truncated, make sure to start your jvm with: -XX:-OmitStackTraceInFastThrow
t
- throwablejava.io.IOException
public static java.lang.String getStackTrace(java.lang.Throwable t)
t
- public static java.lang.String trimMessage(java.lang.String trace)
E.g. java.lang.IllegalStateException: Potential loop detected
will be trimmed to java.lang.IllegalStateException
trace
- string view of stack trace"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"