Reputation: 641
I am new to IntelliJ IDE. I was working with eclipse previously and moving to IntelliJ. In eclipse if there is a new exception for a code in an existing try-catch block, an error is red-underlined. If we right click the error, there is an option to add the respective catch block in the existing try-catch block. Is there anything similar in the IntelliJ too ?
Upvotes: 2
Views: 649
Reputation: 641
Click the cursor on the error. Press Alt + Enter and select any one of the following suggestions Add 'catch' clause
or Add exception to existing catch clause
Upvotes: 1