Python Forum

Full Version: exception name for a flagged stop
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
a few programs i wrote recently run indefinitely or for a very long time. since i don't want to kill them just anywhere, i have coded checks for a stop flag (a file exists). i have now decided that when they do get stopped, i want to know where, so i want to recode them to raise an exception instead of just exiting.

which exception name would be appropriate?
Create a new one:

class Skaperen_Exception(Exception):
    pass