feat(error): support mock error on generator function