Use exceptions is Python.