ripper234 ripper234 - 27 days ago 8
Java Question

Breaking on your own exceptions in IntelliJ

See this question on how to break on any exceptions.

I'm getting a million exceptions on startup. I've tried ignoring ClassNotFoundException, but it's no good, the IDE still seems to break on these (and other) exceptions.

So .. what's a decent configuration for this to catch only real exceptions caught from user code? (Ignore also any exception in jUnit, if applicable)

Answer Source

As mentioned by the other posters, Class Filters are the way to do this.

Specifically, you could add the package names for what you consider "your code" as a class filter. The syntax is a little opaque, but using a simple wildcard filter like:

com.whatever.package.*

sounds like it it will work for you. IntelliJ will break on any exception in any class in any package under here. You can of course define multiple wildcard filters if your code is in more than one place.