Changeset 6059


Ignore:
Timestamp:
03/22/10 10:05:56 (10 years ago)
Author:
callan
Message:

Fixed a problem with MDB parsing where previously eaten exceptions (when being run using reflected universe) were being leaked and causing parsing errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/services/MDBServiceImpl.java

    r6053 r6059  
    109109        tableData.add(columnNames); 
    110110 
    111         while (Data.mdb_fetch_row(table)) { 
     111        while (fetchRow(table)) { 
    112112          String[] row = new String[numCols]; 
    113113          for (int i=0; i<numCols; i++) { 
     
    131131  } 
    132132 
     133  /** 
     134   * Fetches the next row from the table, ignoring potential parsing exceptions. 
     135   * @param table Table to fetch the next available row from. 
     136   * @return <code>true</code> if there are further rows to fetch. 
     137   * <code>false</code> if there are no further rows to fetch or an exception 
     138   * is thrown while parsing the row. 
     139   */ 
     140  private boolean fetchRow(MdbTableDef table) { 
     141    try { 
     142      return Data.mdb_fetch_row(table); 
     143    } catch (Exception e) { 
     144      return false; 
     145    } 
     146  } 
    133147} 
Note: See TracChangeset for help on using the changeset viewer.