Raise informative exceptions for file parsing failures by the EML strategy. Currently, non-XML files input to the EML strategy result in cryptic messages raised by lxml.etree.parse. Wrap this operation in exception management clauses that check for the expected file type, estimated by the file extension.
Note we may want to go a step further and verify that the file is EML.
Raise informative exceptions for file parsing failures by the EML strategy. Currently, non-XML files input to the EML strategy result in cryptic messages raised by
lxml.etree.parse
. Wrap this operation in exception management clauses that check for the expected file type, estimated by the file extension.Note we may want to go a step further and verify that the file is EML.