6

This is similar to Change unhandled exception auto-generated catch code in Eclipse?

which is about changing the code that Eclipse generates for the function 'sorround with try/catch block'.

In my case, I'd like to change the variable name that is used for the exception in such code (the one referred by ${exception_var} in the template). I don't like 'e', cause sometimes it clashes with already defined variables. ex and try ( ex ) {...} would be better.

Community
  • 1
  • 1
zakmck
  • 2,715
  • 1
  • 37
  • 53

1 Answers1

7

In Eclipse Luna, go to Window > Preferences > Java > Code Style > Exception variable name in catch block.

Nathan
  • 8,093
  • 8
  • 50
  • 76
Djon
  • 2,230
  • 14
  • 19