Groovy Documentation

org.codehaus.groovy.grails.exceptions
[Java] Interface StackTraceFilterer


public interface StackTraceFilterer

Improves the output of stack traces produced by exceptions in a Grails application.

Authors:
Graeme Rocher
Since:
2.0


Field Summary
java.lang.String FULL_STACK_TRACE_MESSAGE

java.lang.String SYS_PROP_DISPLAY_FULL_STACKTRACE

 
Method Summary
void addInternalPackage(java.lang.String name)

Adds a package name that should be filtered

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

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

void setCutOffPackage(java.lang.String cutOffPackage)

Sets the package where the stack trace should end

void setShouldFilter(boolean shouldFilter)

@param shouldFilter Whether to filter stack traces or not

 

Field Detail

FULL_STACK_TRACE_MESSAGE

public java.lang.String FULL_STACK_TRACE_MESSAGE


SYS_PROP_DISPLAY_FULL_STACKTRACE

public java.lang.String SYS_PROP_DISPLAY_FULL_STACKTRACE


 
Method Detail

addInternalPackage

public void addInternalPackage(java.lang.String name)
Adds a package name that should be filtered
Parameters:
name - The name of the package


filter

public 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 exception
recursive - Whether to recursively filter the cause
Returns:
The exception passed in, after cleaning the stack trace


filter

public 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


setCutOffPackage

public void setCutOffPackage(java.lang.String cutOffPackage)
Sets the package where the stack trace should end
Parameters:
cutOffPackage - The cut off package


setShouldFilter

public void setShouldFilter(boolean shouldFilter)
Parameters:
shouldFilter - Whether to filter stack traces or not


 

Groovy Documentation