Community
Participate
Working Groups
Consider you have a method with code like this: try { ... } catch (IOException e) { String errorstring = "Error: "; // do some work log.error(errorstring, e); } If you want to extract the whole code in the catch statement, you have one parameter with the name e of type IOException. You can change the name, but not the type of this parameter. It would be nice, if you could also change the type (e.g. show a tree with all super type and the user could decide to use Exception as type in the example above).
This isn't so easy since a super class might not be suficient API wise.
I just saw this functionality elsewere: If you make a method call and the used method throws for example an IOException and you don't throw an exception in the caller method or have a try-catch statement. Then you can use quickfix to add a try-catch or to make the caller method throw the exception. If you select the second alternative, in M3 there will be added an IOException but you can also select to throw an Exception or Throwable. Probably this code can be reused for this issue.