Ignore:
Timestamp:
03/15/2017 08:00:53 PM (9 years ago)
Author:
jdalbey
Message:

AssignedIncidents?, UnitStatus? add try-catch to prepareRenderer to handle bizarre timing exception

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/client/cadclientgui/screens/UnitStatus.java

    r59 r63  
    146146                    int row, int column) 
    147147            { 
    148                 Component comp = super.prepareRenderer(renderer, row, column); 
     148                Component comp; 
     149                // In a rare odd circumstance of timing, this exception is thrown: 
     150                // http://pastebin.com/f5wtSMHN 
     151                try 
     152                { 
     153                    comp = super.prepareRenderer(renderer, row, column); 
     154                } catch (ArrayIndexOutOfBoundsException ex) 
     155                { 
     156                    // our workaround is to just return a dummy value 
     157                    // all will be redrawn in the next one second interval 
     158                    return new JLabel("?"); 
     159                } 
    149160 
    150161                int unitNumColumn = 2; 
Note: See TracChangeset for help on using the changeset viewer.