If any Exception is propagated to outside of the static block, it will be wrapped in an ExceptionInInitializerError. If any Error (including the ExceptionInInitializerError's that wrap Exceptions) is propagated, the class gets labelled as unusable (the VM Spec calls it erroneous).
After an Exception or Error in the static initializer, any use of the class will result in a NoClassDefFoundError. Jeff Mutonho wrote: > What would be the consequence of throwing an IllegalStateException > instead ? I've seen this approach being used in the Spring MVC/ > Portlet's DispatcherServlet and DispatcherPortlet. > > > > > > > > -- > > "Don't take the name of root in vain." > > Jeff Mutonho > Cape Town > South Africa > > GoogleTalk : ejbengine > Skype : ejbengine > Registered Linux user number 366042 > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CTJUG Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/CTJUG-Forum For the ctjug home page see http://www.ctjug.org.za -~----------~----~----~----~------~----~------~--~---
