Best approach to refactor exceptions?

I have a package that uses a lot of custom exceptions. I want to simplify this to only use one custom exception (which all of the others currently extend). So, I need to replace all references to the other exceptions to use the parent and hopefully simplify (or at least flag) the catch blocks referencing the exceptions.

Is there a good way to accomplish this in IDEA?

1 comment
Comment actions Permalink

You should look into Structural Search & Replace. It can probably do most
of the work for your case, but maybe not all.

-Keith

I have a package that uses a lot of custom exceptions. I want to
simplify this to only use one custom exception (which all of the
others currently extend). So, I need to replace all references to the
other exceptions to use the parent and hopefully simplify (or at least
flag) the catch blocks referencing the exceptions.

Is there a good way to accomplish this in IDEA?




0

Please sign in to leave a comment.