Work in Progress

`error()` terminates the process. But on a second thought, shall we use `self:emit('error', ...)` so that a handler can be attached? (Although this particular case is most likely user coding error)