I have a method which is called in about 70 places, I modified it to throw a custom exception now, Eclipse is not able to fix the 70 callers of this with a quick fix, I know there are two possible options for handling it, one is adding a try catch and the other is adding a throws so Eclipse may not be able to figure out which one to apply, but the Quick Fix option doesn't give me the option to apply the selected to all other places. I don't want to do it one by one. There is a discussion about a similar problem but that doesn't seem to help. I also tried changing the method signature through refactoring hoping Eclipse would offer a fix for the callers but it didn't. Is there a way to handle this.
Asked
Active
Viewed 163 times
1
-
Could the issue be that the method has 70 callers ? – John Mar 09 '16 at 06:21
-
@John I don't think so, I tried selecting just two of those and hit Ctrl + 1 for the quick fix, it says "the selected problems do not have a common applicable quick fix" which is weird as there is this common fix of throwing the exception. – User2709 Mar 09 '16 at 06:23
-
I meant that it seems to me that abstraction might be a bit wrong there. – John Mar 09 '16 at 07:23