You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Cantera 2.5, a YAML reaction definition without any rate constant information would raise an InputFileError showing the problematic reaction definition. Now, an error is thrown by ArrheniusBase::validate which does not show the corresponding input location.
Also, reactions containing undeclared species only produce the desired error message if the reaction rate is specified as a dict, but not if it is specified as a list.
Good catch - the error message isn't ideal, but a fix should be relatively easy. Ideally, I'd like to prevent construction without a rate object to catch this much earlier, but I recall that there is a legacy FalloffReaction constructor that prevented that approach when constructing things from the Python interface. From that perspective, I'd like to defer a permanent fix until after Cantera/enhancements#149 is resolved.
speth
changed the title
Reactions with missing rate constant no longer raise InputFileError
Invalid reactions no longer reliably raise InputFileError
May 15, 2022
I ran into a (presumably related) case where ArrheniusBase::validate errors were coming up for reactions with undeclared species, rather than the expected InputFileError, and updated the example above accordingly.
Problem description
In Cantera 2.5, a YAML reaction definition without any rate constant information would raise an
InputFileError
showing the problematic reaction definition. Now, an error is thrown byArrheniusBase::validate
which does not show the corresponding input location.Also, reactions containing undeclared species only produce the desired error message if the reaction rate is specified as a
dict
, but not if it is specified as a list.Steps to reproduce
Behavior
In Cantera 2.6.0, this raises an exception where an
InputFileError
is only given for the third reaction:In Cantera 2.5.1, this input file produced useful error
InputFileError
messages for all four reactions:System information
The text was updated successfully, but these errors were encountered: