How can a Python function explicitly signal that one of its preconditions was not met?
Return the Exception class without raising it.
Exception
Print an error message and always continue executing the function.
Use raise Exception("helpful message").
raise Exception("helpful message")
Call logging.debug() and assume an exception is raised automatically.
logging.debug()