5

I'm using the most up-to-date version of Eclipse (Helios) for Java development. I've written a lot of code for my project, and I'm also using some 3rd-party code in the project.

It's normal for the 3rd-party code to internally throw exceptions, even when nothing is deeply wrong. It will catch these itself. During a normal run, the 3rd-party code might throw a lot of these not-really-a-problem Exceptions.

I'd like to tell Eclipse that, during debugging, it should break when any of my code throws an Exception, but not when other code I'm linking to throws an Exception. Does anyone know if Eclipse supports this?

I know Eclipse lets you break only when Exceptions of certain types are thrown, but that doesn't help when 3rd party code and my own both throw standard Exceptions.

1 Answer 1

3

AFAIK no. But you can set a root Exception and make all your exceptions extends it. Then you can set up a Exception Breakpoint on you root exception.

In the breakpoint window you can do so, there is an icon.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I considered that option. I was just hoping to avoid going through all my code replacing which exception class I'm throwing. I've also found another semi-solution. Most of the 3rd-party code runs, chronologically, before mine. So I've found I can wait until it's mostly my code that's running, and then enable breakpoints.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.