Java Custom Exception Class In Python Definition