Skip to content

Instantly share code, notes, and snippets.

@mojavelinux
Created December 9, 2010 21:31
Show Gist options
  • Save mojavelinux/735369 to your computer and use it in GitHub Desktop.
Save mojavelinux/735369 to your computer and use it in GitHub Desktop.
Seam Catch exception stack trace filter API
public class FooMethodStackTraceFilter implements StackTraceFilter<StackTraceElement> {
public boolean discard(StackTraceElement element) {
return element.getMethodName().equals("foo");
}
}
public class MyStackTraceFilter implements StackTraceFilter<Class> {
public boolean discard(Class element) {
return element.getName().startsWith("org.jboss.ejb");
}
}
public interface StackTraceFilter<T> {
boolean discard(T element);
}
@LightGuard
Copy link

Okay, looking good. Now, what if I have a com.jboss.seam.Bar#foo() in there, added or not?

@LightGuard
Copy link

A value of false wins?

@mojavelinux
Copy link
Author

Now a value of false discards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment