Hi Guys,
Maybe a silly question, but how do I tell Python script to not stop and exit on errors, similar way to what On Error Resume Next does for RhinoScripts ?
–jarek
Hi Guys,
Maybe a silly question, but how do I tell Python script to not stop and exit on errors, similar way to what On Error Resume Next does for RhinoScripts ?
–jarek
Hi @Jarek,
In Python, you can use exception handling for this kind of thing.
try:
# something
except:
# raise error or do something else
thanks! I will give it a shot
Sure.
Note the section on catching specific exceptions. You can spend a very long time trying to debug an unexpected error in a try…except block
Guys - thank you very much - this is all great info, and a good warning.
I need it for something tiny and harmless for now, but I can see using ‘try’ posing some danger once the code grows. Same with “On Error Resume Next” in VBS, actually…
–jarek