I couldn't find a way to refactor a method to either add or remove an
exception from the "throws" clause. I would be a great feature if users
could specify the additional exceptions in the "change method signature"
dialog and a way to specify one of the following 2 options if a new
exception is added.
1) Add "throws" to calling method's signature .
2) Catch exception in calling method.
For example consider the following 2 methods:
public void foo() {
bar();
}
public void bar() {
// some stuff
}
Lets say bar() needs to throw SomeException
public void bar() throws SomeException {
// some stuff
}
Then if option 1) is chosen foo() will change to
public void foo() throws SomeException {
bar();
}
if option 2) is chosen foo() will change to
public void foo() {
try {
bar();
} catch (SomeException e) {
// Handle Exception here
}
}
--Mohan
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features