I'm building a python library that implements a task queue. If for whatever reason the thread that processes the tasks dies, and the option to restart the thread isn't set, I need to throw an exception.
Is this something that I should just throw a RuntimeException
for? I don't want to throw a custom exception since they'd have to import that, but I'm not sure how throw exceptions to arbitrary calling code is best implemented.