diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx index 3e58ffb..366238f 100644 --- a/python/_cosmotool.pyx +++ b/python/_cosmotool.pyx @@ -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 == 0: - return None + try: + data = loadRamsesSimu(basepath, snapshot_id, cpu_id, doublePrecision, flags) + if data == 0: + return None + except RuntimeError as e: + raise RuntimeError(e.message + ' (check the float precision in snapshot)') return PySimulationAdaptor(wrap_simudata(data, flags))