Instead of throwing exception, 'error' event is raised