Find catches for thrown exceptions: how does one invoke it?

Hi there,

How does one use this new feature in 3075? I was expecting to be able to invoke it on the throws keyword for a method, or something similar (kind of like how the CtrlShiftF7 works on the throws, but with Alt+F7).

I also looked in the structural search, but didn't spot it among the predefined templates (I'm not too familiar with the structural search functionality, though, so I wouldn't say it's not there).

Thx,
Andrei

4 comments

AO> How does one use this new feature in 3075?

Of course, I meant 3084. :)

Andrei

0

Andrei Oprea wrote:

Hi there,

How does one use this new feature in 3075? I was expecting to be able to invoke it on the throws keyword for a method, or something similar (kind of like how the CtrlShiftF7 works on the throws, but with Alt+F7).


Exactly as you think: Alt-F7 on throw or throws keyword.

If you used this feature on throws keyword, you should select specific
exception to search from the method throws list from the combo box.

Anton Moscal
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Hello Anton,

Yep, you're right, Alt+F7 on the throws does the trick. I guess I was thrown off by the look of the dialog (and its "Find Usages" title), it seemed like IDEA just picked the first exception following the throws in order to search for its usages (in the regular way, not for catches). Maybe you could change the title of the dialog to be a bit more informative?

Thx,
Andrei

AM> Andrei Oprea wrote:
AM>
>> Hi there,
>>
>> How does one use this new feature in 3075? I was expecting to be able
>> to invoke it on the throws keyword for a method, or something similar
>> (kind of like how the CtrlShiftF7 works on the throws, but with
>> Alt+F7).
>>
AM> Exactly as you think: Alt-F7 on throw or throws keyword.
AM>
AM> If you used this feature on throws keyword, you should select
AM> specific exception to search from the method throws list from the
AM> combo box.
AM>
AM> Anton Moscal
AM> JetBrains Inc.
AM> http://www.intellij.com
AM> "Develop with pleasure!"

0

Hello Anton,

One more thing: is it supposed to work through the call hierarchy? At this point it finds only the catches in the first level of invocations.

Best,
Andrei

0

Please sign in to leave a comment.