Java Custom Exception Class In Python 3