Fix Error handling for generator

A generator raising an exception will now correctly emit an `error` event.
This can be used in unit test as the error event is now binded between the generator and its run context. 
In which case would we pass an empty host? Looks to me like we check for `process` and `process.domain`, so we know this parameter is going to be there.