emit error instead of exiting