Add some small annotation to runtime error. Most likely reason is 'doublePrecision' setting

This commit is contained in:
Guilhem Lavaux 2015-02-20 10:28:07 +01:00
parent 1fe8f58105
commit f775df8310

View File

@ -538,9 +538,12 @@ def loadRamses(str basepath, int snapshot_id, int cpu_id, bool doublePrecision =
if loadId:
flags |= NEED_GADGET_ID
data = loadRamsesSimu(basepath, snapshot_id, cpu_id, doublePrecision, flags)
if data == <SimuData*>0:
return None
try:
data = loadRamsesSimu(basepath, snapshot_id, cpu_id, doublePrecision, flags)
if data == <SimuData*>0:
return None
except RuntimeError as e:
raise RuntimeError(e.message + ' (check the float precision in snapshot)')
return PySimulationAdaptor(wrap_simudata(data, flags))