Please, note that InstantiationError is NOT subclass of Exception.
So that part is definitely OK.

And, if the method throws Exception and some Exception subclass...
that may be interesting discussion about the coding style.

r.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 07, 2001 1:16 PM
> To: [EMAIL PROTECTED]
> Subject: [Eap-list] bug in pandora 531 "surround with"
> 
> 
> 
> 
> When using the "surround with" function on a method call to 
> wrap it with a
> try/catch block, Idea is putting the highest level exception 
> first, and is not
> catching all the execptions thrown by the method.
> 
> Below is the example of code that demonstrates what the bug produced.
> 
> 
> 
> 
> public void init() throws ServletException {
>         super.init();
>         try {
>             initActions();
>         } catch (Exception e) {
>         } catch (InstantiationError error) {
>         }
>     }
> 
> private void initActions()throws ClassNotFoundException,
> InstantiationError,Exception{
>        actions  =   new HashMap();
>        HashMap actionConfig = getActionConfiguration();
>        Set keys = actionConfig.keySet();
>        Iterator it  =   keys.iterator();
> 
>         while(it.hasNext()){
>             String keyName = (String) it.next();
> 
> actions.put(keyName,Class.forName((String)actionConfig.get(key
> Name)).newInstance());
>         }
>  }
> 
> 
> 
> 
> _______________________________________________
> Eap-list mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-list
> 

_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to