Java – how do I ignore certain types of uncapped exceptions in eclipse?

I use third - party libraries in my java applications This third - party library throws a custom uncapped exception when each application starts Exceptions are harmless and are only used for recording within a third party library Since this exception was not caught, my eclipse ide will switch to the debugging perspective and suspend thread execution each time the application starts to notify me of the problem I had to tell eclipse manually to ignore this and resume debugging every time This is annoying. In order to solve this problem, I can't change the third-party library

Is there a way to tell the eclipse ide to ignore certain types of uncapped exceptions?

I tried "step filtering", but (I think) because the custom uncapped exception is not in the stack trace, it is not filtered out of the debugger This is the first time I entered step filtering, so I can use it wrong This is an example stack trace

Daemon Thread [Thread-13] (Suspended (exception CustomThirdPartyException)) 
    ThreadPoolExecutor$Worker.run() line: not available [local variables unavailable]   
    Thread.run() line: not available

Edit:

After jluzwick uses our own recorder and disables all uncapped exceptions in eclipse, we can view uncapped exceptions in our own recorder, but technically it works, but it is not ideal. If our recorder is damaged, we may miss anything

Mazaneicha's solution seems to be on the right track, but I can't make it work the way I want This may be due to some of my user errors

Both jluzwick and mazaneicha may work on this problem, but Konstantin komissarchik has the "right" answer, because it should be pushed back to the creator of the library Sometimes technical solutions are not right

Solution

An old thread, but thought I would add a little

At least eclipse indigo: in the debug perspective – > breakpoints view:

>Specify breakpoints for exceptions (and potential subclasses) to pause This can be done by clicking "add Java exception breakpoint" An icon with a j and an exclamation point. > Right click the breakpoint and select breakpoint Properties > go to filter > specify the class or package to ignore This will add them to the list Just make sure you uncheck them to describe it as exclusive (don't stop at the specified position)

I prefer to use it so that I can specify nullpointerexceptions as a general exception breakpoint, but ignore packages from third-party libraries

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>