Package org.grails.exceptions.reporting
Interface StackTraceFilterer
-
- All Known Implementing Classes:
DefaultStackTraceFilterer
public interface StackTraceFiltererImproves the output of stack traces produced by exceptions in a Grails application.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFULL_STACK_TRACE_MESSAGEstatic java.lang.StringSYS_PROP_DISPLAY_FULL_STACKTRACE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddInternalPackage(java.lang.String name)Adds a package name that should be filteredjava.lang.Throwablefilter(java.lang.Throwable source)Remove all apparently Grails-internal trace entries from the exception instancejava.lang.Throwablefilter(java.lang.Throwable source, boolean recursive)Remove all apparently Grails-internal trace entries from the exception instancevoidsetCutOffPackage(java.lang.String cutOffPackage)Sets the package where the stack trace should endvoidsetShouldFilter(boolean shouldFilter)
-
-
-
Field Detail
-
FULL_STACK_TRACE_MESSAGE
static final java.lang.String FULL_STACK_TRACE_MESSAGE
- See Also:
- Constant Field Values
-
SYS_PROP_DISPLAY_FULL_STACKTRACE
static final java.lang.String SYS_PROP_DISPLAY_FULL_STACKTRACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
addInternalPackage
void addInternalPackage(java.lang.String name)
Adds a package name that should be filtered- Parameters:
name- The name of the package
-
setCutOffPackage
void setCutOffPackage(java.lang.String cutOffPackage)
Sets the package where the stack trace should end- Parameters:
cutOffPackage- The cut off package
-
filter
java.lang.Throwable filter(java.lang.Throwable source, boolean recursive)Remove all apparently Grails-internal trace entries from the exception instance
This modifies the original instance and returns it, it does not clone
- Parameters:
source- The source exceptionrecursive- Whether to recursively filter the cause- Returns:
- The exception passed in, after cleaning the stack trace
-
filter
java.lang.Throwable filter(java.lang.Throwable source)
Remove all apparently Grails-internal trace entries from the exception instance
This modifies the original instance and returns it, it does not clone
- Parameters:
source- The source exception- Returns:
- The exception passed in, after cleaning the stack trace
-
setShouldFilter
void setShouldFilter(boolean shouldFilter)
- Parameters:
shouldFilter- Whether to filter stack traces or not
-
-