sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Help
HEAD
Rev: 3222 - svn://svn.freehep.org/svn / freehep / cvs / application / trunk / studio / Studio.java
Unified Diff View - Studio.java
Search for Help
/freehep/cvs/application/trunk/studio/Studio.java @ revision 3221
/freehep/cvs/application/trunk/studio/Studio.java @ revision 3222
@@ -19,7 +19,7 @@ /**  *  * @author tonyj - * @version $Id: Studio.java 3221 2005-03-12 07:53:06Z tonyj $ + * @version $Id: Studio.java 3222 2005-03-12 08:07:05Z tonyj $  */ public class Studio extends MDIApplication { @@ -76,15 +76,24 @@    }    private Plugin initializePlugin(PluginInfo plugin, ClassLoader loader) throws Throwable    { -      getAppProperties().putAll(plugin.getProperties()); -      Class c = loader.loadClass(plugin.getMainClass()); -      Plugin plug = (Plugin) c.newInstance(); -      plug.setContext(this); -      plugin.setPlugin(plug); +      try +      { +         getAppProperties().putAll(plugin.getProperties()); +         Class c = loader.loadClass(plugin.getMainClass()); +         Plugin plug = (Plugin) c.newInstance(); +         plug.setContext(this); +         plugin.setPlugin(plug); -      if (isApplicationInitialized) plug.postInit(); -      if (isApplicationVisible) plug.applicationVisible(); -      return plug; +         if (isApplicationInitialized) plug.postInit(); +         if (isApplicationVisible) plug.applicationVisible(); +         plugin.setErrorStatus(null); +         return plug; +      } +      catch (Throwable t) +      { +         plugin.setErrorStatus(t); +         throw t; +      }    }    /**     * Return the list of installed plugins. @@ -231,6 +240,7 @@                if (debugExtensions) System.out.println("Loading plugin: "+plugin.getName());                long start = System.currentTimeMillis();                initializePlugin(plugin, loader); +               plugin.setErrorStatus(null);                long stop = System.currentTimeMillis();                if (debugExtensions) System.out.println("Done loading in : "+(stop-start)+"ms");             }


feed icon

sventon 2.5.1