test errorOccur event is fired for all errors