Originally posted by Ernest Friedman-Hill:
You can't throw a checked exception, but you can throw an unchecked one -- i.e., a RuntimeException. This will result in the JVM throwing an ExceptionInInitializerError which, depending on the circumstances, you may be able to catch somewhere else in your code.
thanx for the reply. I think I better throw ExceptionInInitializerError itself. This makes more sense in my code that an exception has occured during static initialisation.
Thanx,
SHankar.
[ November 16, 2003: Message edited by: shankar vembu ]
[ November 16, 2003: Message edited by: shankar vembu ]