I created a class that contains several enums. Each enum has a few methods that contain as part of the method signature 'throws Exception'.
For some reason when I save the class using eclipse 3.2, it displays that I have 12 errors an error on line 1 that reads "Unhandled exception type Exception" -- The code runs fine without any errors even when it uses that class. Is this an eclipse issue or a java issue? Is an enum allowed to throw an Exception?
The code contains a list Enums, each defines a particular sql statement, and returns a Java Set of results -- I thought this was a nice uniform way of handling a process that is repeated 30 time.
I have a method in the class that is 'getData()' and it returns a Set. -- That method throws an Exception
I mean, show the shortest, simplest example in code of what you're talking about.
And I'm not necessarily committing myself to be the one to help, but if you're going to get anywhere with anyone, you need to make it more clear what the issue is. So an example would be needed as far as I'm concerned.
Reminds me of the old joke:
old lady to young boy: What does you Daddy do for a living?
boy: He's dead.
old lady: I'm so sorry. What did he do before he died?
boy: This: (grabs chest and rolls eyes) Aaa-rrgghh!