Added example in how generator object is done when Error is sent