Add `emitError` option
Merge pull request #9 from kotas/issues/8

Add `emitError` option