Add catch clause for specific type above catch-all clause
已回答
On a fairly regular basis when I have a try/catch block where the lone catch clause captures multiple exception types using a base-class exception type, I would like to be able split out the handling for a specific type of exception. The lazy programmer in me says that IDEA should be able to make this easy with an Intention to add a catch clause above the catch-all clause for a selected exception type.
http://www.jetbrains.net/jira/browse/IDEA-14594
帖子评论已关闭。
That is a very good idea.
Hits me on a regular basis as well, so +1!
News about that after 10 years?
@Andybergon 11
Hi.
https://youtrack.jetbrains.com/issue/IDEA-40665 was fixed in 2007, please check this comment: https://youtrack.jetbrains.com/issue/IDEA-40665#comment=27-36772