Commit 48bf0fed authored by sumpfralle's avatar sumpfralle

handle ODE errors gracefully


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1038 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 7ccef0ae
......@@ -443,7 +443,12 @@ def _get_physics(models, cutter, calculation_backend):
return None
elif calculation_backend == "ODE":
import pycam.Physics.ode_physics as ode_physics
try:
return ode_physics.generate_physics(models, cutter)
except MemoryError:
return "The ODE library returned an unexpected error " + \
"condition. You need to to disable ODE for this " + \
"calculation. Sorry!"
else:
return "Invalid calculation backend (%s): not one of %s" \
% (calculation_backend, CALCULATION_BACKENDS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment