Skip to content

Commit

Permalink
Throw FormatException if XML is malformed. Closes #449.
Browse files Browse the repository at this point in the history
  • Loading branch information
melissalinkert committed Dec 18, 2009
1 parent d5c54d5 commit 96b01a8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/bio-formats/src/loci/formats/in/OMEXMLReader.java
Expand Up @@ -260,7 +260,12 @@ protected void initFile(String id) throws FormatException, IOException {
compression = new Vector<String>();

DefaultHandler handler = new OMEXMLHandler();
XMLTools.parseXML(in, handler);
try {
XMLTools.parseXML(in, handler);
}
catch (IOException e) {
throw new FormatException("Malformed OME-XML", e);
}

if (binDataOffsets.size() == 0) {
throw new FormatException("Pixel data not found");
Expand Down

0 comments on commit 96b01a8

Please sign in to comment.