Note that BaseException is absent in Python 2.4.