Changing the default template for a catch block?

In certain project I need to respect the convention that exceptions declared in a catch block should be final, like:

 
try {
    ...
} catch (final Exception e) {
    ...
}


Where I can configure this in IntelliJ Ultimate?

4 comments
Comment actions Permalink

I do have checked "Make caught exception variables final" , as explained in the link you sent me.

I am assuming that the Scheme that appears when selecting Code Style in the menu is the default Scheme for the current project, correct? Where else could be the problem?

Thanks.
0
Comment actions Permalink

You can't have it enabled as there is no "Make caught exception variables final" option yet, it was a suggestion from the user who submitted this bug.

And the bug is that "Make generated local variables final" option has no effect for generated catch code. As you can see the bug is not fixed yet.

0
Comment actions Permalink

Sorry, I read it too fast and thought that it referred to "Make generated parameters final", that is indeed checked in my settings.

It is a pitty it is a bug. Thanks for the feedback.

0

Please sign in to leave a comment.