raise ValueError(output_data["error"])
// Move several pieces up a level
if output_data["success"]:
output_data["provenance"]["memory"] = round(output_data.pop("memory") / (1024**3), 3) // Move back to GB
output_data["provenance"]["nthreads"] = output_data.pop("nthreads")
output_data["stdout"] = output_data.pop("raw_output", None)
After Change
if "PSIO Error" in error_message:
raise ResourceError(error_message)
elif "SIGSEV" in error_message:
raise RandomError(error_message)
elif "TypeError: set_global_option" in error_message:
raise InputError(error_message)
elif "RHF reference is only for singlets" in error_message:
raise InputError(error_message)
else:
raise UnknownError(error_message)
// Move several pieces up a level