olca-app icon indicating copy to clipboard operation
olca-app copied to clipboard

JSON export fails when there are formula errors

Open msrocka opened this issue 3 years ago • 1 comments

The JSON export correctly checks for used global parameters in the formulas in order to export them as dependencies. But when there are errors in the formulas it breaks the full export. This should not happen or at least display an error that the users can understand.

msrocka avatar Oct 14 '21 08:10 msrocka

still an issue; here is an example to test it


mass = db.get(FlowProperty, "93a60a56-a3c8-11da-a746-0800200b9a66")

param = Parameter.global("param", 42)
p = Flow.product("p", mass)
e = Flow.elementary("e", mass)
db.insert(param, p, e)

P = Process.of(P, p)
P.output(e, 0).amountFormula = "param * fails"
db.insert(P)

App.runInUI("go!", lambda: Navigator.refresh())

msrocka avatar May 17 '23 15:05 msrocka