public class ExceptionUtils extends Object
Constructor and Description |
---|
ExceptionUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getFilteredStackTrace(Throwable t)
Simple util to get stack trace.
|
static String |
getStackTrace(Throwable t)
Get the full stacktrace as a string
|
static String |
trimMessage(String trace)
Utility method to trim the message from a stack trace
string.
|
public static String getFilteredStackTrace(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
- throwableIOException
public static String getStackTrace(Throwable t)
t
- public static String trimMessage(String trace)
E.g. java.lang.IllegalStateException: Potential loop detected
will be trimmed to java.lang.IllegalStateException
trace
- string view of stack traceCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.