[ck2cti] Check for formatting errors in elemental composition
Formatting errors (e.g. values in incorrect columns) result in an empty elemental composition. Raise an exception if this occurs.
This commit is contained in:
parent
26cb89b228
commit
d76b67f5fb
1 changed files with 5 additions and 0 deletions
|
|
@ -952,6 +952,11 @@ class Parser(object):
|
|||
composition2 = self.parseComposition(elements, len(elements)//10, 10)
|
||||
composition.update(composition2)
|
||||
|
||||
if not composition:
|
||||
raise InputParseError("Error parsing elemental composition for "
|
||||
"species '{0}'".format(species))
|
||||
|
||||
|
||||
# Construct and return the thermodynamics model
|
||||
thermo = MultiNASA(
|
||||
polynomials=[
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue