replaced deprecated BaseException