
Sept. 30, 2021
12:18 a.m.
On further thought, maybe something like this is what you are looking for? https://code.activestate.com/recipes/580808-guard-against-an-exception-in-th... This allows you to replace one or more kinds of exceptions with another specified exception (defaults to RuntimeError) using a context manager. -- Steve