Skip to content

Commit 63ca389

Browse files
committed
[VersionConv] Change exception type
Closes #359 Changed plain Exception in '_parse' to odml.tools.parser_utils.ParserException.
1 parent 3aa90c3 commit 63ca389

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

odml/tools/converters/version_converter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
from lxml import etree as ET
1414

15+
from ..parser_utils import ParserException
16+
1517
from ...format import Document, Section, Property
1618
from ...info import FORMAT_VERSION
1719
from ...terminology import Terminologies, REPOSITORY_BASE
@@ -52,7 +54,7 @@ def _parse_xml(self):
5254
tree = ET.parse(self.filename, parser)
5355
else:
5456
msg = "Cannot parse provided file object '%s'." % self.filename
55-
raise Exception(msg)
57+
raise ParserException(msg)
5658

5759
return tree
5860

0 commit comments

Comments
 (0)