avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/altprofile/profiler/gui ProfilerFrame.java
Date Wed, 20 Mar 2002 03:19:26 GMT
leif        02/03/19 19:19:26

  Modified:    all/src/scratchpad/org/apache/avalon/excalibur/altprofile/profiler/gui
                        ProfilerFrame.java
  Log:
  Trap an exception which can be thrown if an inner frame is closed at the wrong
  time.  This will be fixed in a better way when things are redesigned for the
  instrument package.
  
  Revision  Changes    Path
  1.9       +23 -15    jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/altprofile/profiler/gui/ProfilerFrame.java
  
  Index: ProfilerFrame.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/altprofile/profiler/gui/ProfilerFrame.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ProfilerFrame.java	16 Mar 2002 00:05:44 -0000	1.8
  +++ ProfilerFrame.java	20 Mar 2002 03:19:26 -0000	1.9
  @@ -38,7 +38,7 @@
   /**
    *
    * @author <a href="mailto:leif@silveregg.co.jp">Leif Mortenson</a>
  - * @version CVS $Revision: 1.8 $ $Date: 2002/03/16 00:05:44 $
  + * @version CVS $Revision: 1.9 $ $Date: 2002/03/20 03:19:26 $
    * @since 4.1
    */
   public class ProfilerFrame
  @@ -89,22 +89,30 @@
           {
               try
               {
  -                Thread.sleep( 1000 );
  -            }
  -            catch( InterruptedException e )
  -            {
  -            }
  -
  -            // Update each of the ProfileSampleFrames.  This is kind of temporary
  -            //  to get rid of the one thread per frame issue.
  -            JInternalFrame[] frames = m_desktopPane.getAllFrames();
  -            for( int i = 0; i < frames.length; i++ )
  -            {
  -                JInternalFrame frame = frames[ i ];
  -                if( frame instanceof ProfileSampleFrame )
  +                try
                   {
  -                    ( (ProfileSampleFrame)frame ).update();
  +                    Thread.sleep( 1000 );
                   }
  +                catch( InterruptedException e )
  +                {
  +                }
  +    
  +                // Update each of the ProfileSampleFrames.  This is kind of temporary
  +                //  to get rid of the one thread per frame issue.
  +                JInternalFrame[] frames = m_desktopPane.getAllFrames();
  +                for( int i = 0; i < frames.length; i++ )
  +                {
  +                    JInternalFrame frame = frames[ i ];
  +                    if( frame instanceof ProfileSampleFrame )
  +                    {
  +                        ( (ProfileSampleFrame)frame ).update();
  +                    }
  +                }
  +            }
  +            catch ( Throwable t )
  +            {
  +                // Should not get here, but we want to make sure that this never happens.
  +                System.out.println( "Unexpected error caught in ProfilerFrame runner: "
+ t );
               }
           }
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message