java - How to jump where exception caught in IntelliJ debugger? -


i have

throw new indexoutofboundsexception(); 

line in code. unfortunately, exception has no effect: i.e. no message appeared , no program crash.

this because code called somewhere in system library , there exception caught , processed.

how find place?

if press f8 on line, jump code inside scene:

            try {                 tm = dndgesture.processtargetdrop(dragevent);             } {                 dragboardhelper.setdataaccessrestriction(                         dndgesture.dragboard, true);             } 

but code catches exception? think should execute finally block , go somewhere's catch block. doesn't happen: if continue pressing f8 see no try/catch/finally blocks.

how can happen?

you're looking exception breakpoint, can set break on exception though caught. in breakpoints dialog (it default bound ctrl+shift+f8 or cmd+shift+f8 depending on platform, or click the breakpoint dialog button in debug task pane), create java exception breakpoint notifications on both caught , uncaught.

screenshot of breakpoint dialog

then, once breakpoint triggers, should able step through code , see call stack , see what's catching it.

for more information, see creating exception breakpoints in intellij idea documentation, links specifics configuration options in breakpoint dialog.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -