I couldn't find a way to refactor a method to either add or remove an
exception from the "throws" clause. It 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.
[b][code][u]1) Add "throws" to calling method's signature .
2) Catch exception in calling method.[/u][/code][/b]

[b]For example consider the following 2 methods:[/b]

[code]public void foo() {
bar();
}

public void bar() {
// some stuff
}[/code]

[i]Lets say bar() needs to throw SomeException[/i]

[code]public void bar() throws SomeException {
// some stuff
}[/code]

[i]Then if option 1) is chosen foo() will change to[/i]

[code]public void foo() throws SomeException {
bar();
}[/code]

[i]if option 2) is chosen foo() will change to[/i]

[code]public void foo() {
try {
bar();
} catch (SomeException e) {
// Handle Exception here
}
}[/code]

--Mohan


_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features

Reply via email to