Python Manually Throw Exception