How to minimize "Unknown source" Exceptions?
Hi,
I've been writing a few applications recently and compiling with javac, and I've noticed that many of the Exceptions I get have "Unknown source" in the stack trace. This isn't a problem in my applications as they're all very small, but in a larger application this would be a huge pain to debug.
Basically, I do not even know what causes "Unknown source" exceptions. I assume mine are due to some flaw in my design. I couldn't find any information on these forums or on Google, because "Unknown source exception" isn't exactly the easiest term to search for, as it will simply return millions of stack traces of unknown source, and not what I actually want to find out.
For example, in one class I have two private methods, createInitializationData(), and initializeClient(). I also have a public method, run(), as the class implements Runnable. I start this class in a new thread, and the run() method will call the initializeClient() method, which will call the createInitializationData() method. Whenever I get an exception in this program, it is always "Unknown source".
I have two questions:
(1) What causes "Unknown source" Exceptions? Is it something preventable through an alteration in design?
(2) What is the best way to minimize these types of Exceptions? Is there a common flaw I should be aware of?
Thanks,
Dan

