emit error instead of throwing exception