Fix warning message about using deprecated BaseException.message