Package org.apache.tika.utils
Class ExceptionUtils
- java.lang.Object
- 
- org.apache.tika.utils.ExceptionUtils
 
- 
 public class ExceptionUtils extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description ExceptionUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetFilteredStackTrace(Throwable t)Simple util to get stack trace.static StringgetStackTrace(Throwable t)Get the full stacktrace as a stringstatic StringtrimMessage(String trace)Utility method to trim the message from a stack trace string.
 
- 
- 
- 
Method Detail- 
getFilteredStackTracepublic static String getFilteredStackTrace(Throwable t) Simple util to get stack trace.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 - Parameters:
- t- throwable
- Returns:
- Throws:
- IOException
 
 - 
getStackTracepublic static String getStackTrace(Throwable t) Get the full stacktrace as a string- Parameters:
- t-
- Returns:
 
 - 
trimMessagepublic static String trimMessage(String trace) Utility method to trim the message from a stack trace string.E.g. java.lang.IllegalStateException: Potential loop detectedwill be trimmed tojava.lang.IllegalStateException- Parameters:
- trace- string view of stack trace
- Returns:
- trimmed stack trace
 
 
- 
 
-