Closed iSchomer closed 8 years ago
@iSchomer can you add the line and the file where we catch the exception
Mm I see. The error log should indicate that the exception is thrown in the tree though. Is that not happening?
Even if it does, it's pretty confusing to see an error message about a failed discharge when in fact the problem is a missing input.
Also it's worth mentioning that the automatic charge that happens within run_discharge
is quite time-consuming with Dualfoil. The voltage hold at the end of the charge could last up to 40 minutes in run time I would guess.
Yes we need to expose some of the parameters on the (re)charging step to the user.
This isa possible fix
except RuntimeError as e:
print(e)
print('Failed to discharge at {0} watt'.format(discharge_power))
break
It is not ideal but I'm not sure we can throw different kind of errors with Boost.Python See the doc
PR #205 should resolve this issue.
Errors raised from the PropertyTree
will not be casted as RuntimeError
any more.
When the
RagoneAnalysis
object callsrun_discharge
, that method tries to get two values fromPropertyTree
.RagoneAnalysis
catches that potential RuntimeError, but only with the assumption that it was caused by a failed constant-power discharge, so the user is not notified that they are missingPropertyTree
entries.