Reputation: 1170
I'm new to Java and using InteliJ Idea community edition. I previously used Visual Studio with C#, where I could select if exception would break (and wait "as breakpoint") on my code only.
meaning I could choose to avoid seeing exceptions of 3rd party libraries, until (and only if) they affect my code.
At InteliJ Idea I could not find that option... Only "stop at all exceptions" which is mostly to verbose for me
Upvotes: 2
Views: 494
Reputation: 49606
There is no handy option to exclude/include the whole scope (e.g. your current project scope), but you may write a class pattern to filter out individual packages (e.g. -java.* -sun.*
).
You also may play with the condition for hitting a breakpoint. It has the context of an exception itself (this
) and, thus, this.getStackTrace()
which can be used to determine what path, origin (getStackTrace()[0]
), or destination (getStackTrace()[getStackTrace().length - 1]
) to reject. It's not the best solution, but, at least, an option to consider.
Upvotes: 1