I am using GMSH, a C-library with a Python API.
Sometimes, GMSH crashes and it forces my Python script to quit. However, I am doing more than one runs in a for loop and if one of them crashes, I would like to continue my for loop.
Obviously, the first thing I did was to use:
try:
gmsh.model.mesh.generate()
except:
print("error!")
However, it didn't work! If the error was natural, it did work, but if it was a run-time really unexpected error, my Python program always crashed.
How can i make sure that my Python program never quits no matter what happens in C or binary side?