C
Chris Miller
Hi Folks,
I developing a proxy application, so threads seems like a good way to go.
In the early stages, I prefer to be inundated with stack traces so I can
judiciously decide what things will happen and which things I selectively
want to handle, so I can ignore/log the rest. To that end, I thought it
would be a good idea to catch and throw Exception, rather than one of the
many subclasses. When I tried to declare my run() method as:
public final void run() throws Exception
Eclipse complained:
Exception Exception is not compatible with throws clause in
Runnable.run()
I'm willing to take Eclipse at his word -- he's usually right, but I am
curious why this is the case, if anybody happens to know, and I'm also
interested in what I should declare as my class of exceptions so I can be a
general as I think I should.
Thanks for the help,
Chris.
I developing a proxy application, so threads seems like a good way to go.
In the early stages, I prefer to be inundated with stack traces so I can
judiciously decide what things will happen and which things I selectively
want to handle, so I can ignore/log the rest. To that end, I thought it
would be a good idea to catch and throw Exception, rather than one of the
many subclasses. When I tried to declare my run() method as:
public final void run() throws Exception
Eclipse complained:
Exception Exception is not compatible with throws clause in
Runnable.run()
I'm willing to take Eclipse at his word -- he's usually right, but I am
curious why this is the case, if anybody happens to know, and I'm also
interested in what I should declare as my class of exceptions so I can be a
general as I think I should.
Thanks for the help,
Chris.