refactor license error message into erorr class