Changeset 4308


Ignore:
Timestamp:
08/14/08 11:17:42 (12 years ago)
Author:
melissa
Message:

Rearranged calls to IFormatReader.close() - no longer throws an exception when opening multiple series.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/Importer.java

    r4305 r4308  
    621621      // -- Step 5: finish up -- 
    622622 
     623      try { 
     624        if (!options.isVirtual()) r.close(); 
     625      } 
     626      catch (IOException exc) { 
     627        reportException(exc, options.isQuiet(), 
     628          "Sorry, there was a problem closing the file"); 
     629      } 
     630 
    623631      plugin.success = true; 
    624632    } 
     
    642650    MetadataRetrieve retrieve, int cCount, int zCount, int tCount, 
    643651    int sizeZ, int sizeC, int sizeT, FileInfo fi, final IFormatReader r, 
    644     ImporterOptions options, String metadata) 
     652    final ImporterOptions options, String metadata) 
    645653    throws FormatException, IOException 
    646654  { 
     
    650658      public void close() { 
    651659        super.close(); 
    652         try { 
    653           r.close(); 
    654         } 
    655         catch (IOException e) { } 
     660        if (options.isVirtual()) { 
     661          try { 
     662            r.close(); 
     663          } 
     664          catch (IOException e) { } 
     665        } 
    656666      } 
    657667    }; 
     
    686696    int c = r.getSizeC(); 
    687697    int t = r.getSizeT(); 
    688     try { 
    689       if (!options.isVirtual()) r.close(); 
    690     } 
    691     catch (IOException exc) { 
    692       reportException(exc, options.isQuiet(), 
    693         "Sorry, there was a problem closing the file"); 
    694     } 
    695698 
    696699    if (!concatenate && mergeChannels) imp.show(); 
Note: See TracChangeset for help on using the changeset viewer.