Catch clause exception name

Here's a simple question: Is there a way to change the exception name
IDEA uses in a generated catch clause? Our convention is "ex", not "e".
I've looked about, but not found a way.

2 comments
Comment actions Permalink

I have this in my custom codestyles/Style.XML file:
]]>
and it does exactly what you need.

Michael Besosa wrote:

Here's a simple question: Is there a way to change the exception name
IDEA uses in a generated catch clause? Our convention is "ex", not "e".
I've looked about, but not found a way.

0
Comment actions Permalink

Ah! I knew there had to be a way. Many thanks.

Richard Nemec wrote:

I have this in my custom codestyles/Style.XML file:
<option name="PARAMETER_TYPE_TO_NAME">
<value>
<pair type="int" name="i" />
<pair type="byte" name="b" />
<pair type="char" name="c" />
<pair type="long" name="l" />
<pair type="short" name="i" />
<pair type="boolean" name="b" />
<pair type="double" name="d" />
<pair type="float" name="f" />
<pair type="java.lang.Object" name="o" />
<pair type="java.lang.String" name="s" />
<pair type="*Exception" name="ex" />
<pair type="*Event" name="event" />
</value>
</option>
and it does exactly what you need.

Michael Besosa wrote:

>> Here's a simple question: Is there a way to change the exception name
>> IDEA uses in a generated catch clause? Our convention is "ex", not
>> "e". I've looked about, but not found a way.

0

Please sign in to leave a comment.