I've got (multiple) functions which I need to call a large number of times with essentially random arguments, and I need to create a log of what is returned each time, and with what arguments. Usually the function returns something or raises an error, in which case I can handle it fine.
However, I've now found some arguments that cause the function to cause a core dump, which also kills my script. What I would prefer is to raise an exception, which could then get handled by my existing exception handling code. Then it would get recorded as normal, and continue testing other inputs. Is there a way to do this?