emit error on nexttick