Changeset 4858


Ignore:
Timestamp:
02/27/09 16:23:20 (11 years ago)
Author:
melissa
Message:

Throw more informative exceptions if ome-xml.jar is missing.

Location:
trunk/components/bio-formats/src/loci/formats/in
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/OMETiffReader.java

    r4758 r4858  
    105105    String xml = TiffTools.getComment(firstIFD); 
    106106    IMetadata meta = MetadataTools.createOMEXMLMetadata(xml); 
     107 
     108    if (meta == null) { 
     109      throw new FormatException("ome-xml.jar is required to read OME-TIFF " + 
     110        "files.  Please download it from " + 
     111        "http://loci.wisc.edu/ome/formats-library.html"); 
     112    } 
     113 
     114 
    107115    String currentUUID = meta.getUUID(); 
    108116    MetadataTools.convertMetadata(meta, metadataStore); 
  • trunk/components/bio-formats/src/loci/formats/in/OMEXMLReader.java

    r4681 r4858  
    222222    MetadataRetrieve omexmlMeta = (MetadataRetrieve) 
    223223      MetadataTools.createOMEXMLMetadata(omexml); 
     224 
     225    if (omexmlMeta == null) { 
     226      throw new FormatException("ome-xml.jar is required to read " + 
     227        "OME-XML files. Please download it from " + 
     228        "http://loci.wisc.edu/ome/formats-library.html"); 
     229    } 
    224230 
    225231    int numDatasets = omexmlMeta.getImageCount(); 
Note: See TracChangeset for help on using the changeset viewer.