SimVascular / svZeroDSolver-Archived

A Python lumped-parameter solver for blood flow and pressure in hemodynamic networks
Other
12 stars 15 forks source link

Remove assert causing syntax error. #78

Closed ktbolt closed 11 months ago

ktbolt commented 11 months ago

See Issue https://github.com/SimVascular/svZeroDSolver/issues/77.

mrp089 commented 11 months ago

@ktbolt, if you look at the git blame, there was a reason for these asserts (see #74). This error could be triggered by wrong user input, so I don't think it's a good idea to just delete statements that are supposed to catch errors.

Can you throw an error instead if you don't like assert statements?

ktbolt commented 11 months ago

@mrp089 Asserts are used for testing and not for production. I'll replace them with exceptions.

ktbolt commented 11 months ago

I've replaced the asserts with exceptions.

Note that asserts are disabled for a Release build so now these checks will cause the code to fail.