emit error to stream instead of throwing (plugin guidelines)