首页 文章

Eclipse,在自动生成的代码中更改异常变量名称

提问于
浏览
3

这类似于Change unhandled exception auto-generated catch code in Eclipse?

这是关于改变Eclipse为函数'sorround with try / catch block'生成的代码 .

在我的情况下,我'd like to change the variable name that is used for the exception in such code (the one referred by $ in the template). I don' t喜欢'e',因为有时它与已经定义的变量冲突 . extry ( ex ) {...} 会更好 .

1 回答

  • 4

    在Eclipse Luna中,转到catch块中的Window - > Preferences - > Java - > Code Style - > Exception变量名 .

相关问题