Fire the error handler after setting the error, otherwise the error handler can not get access ot the eror that just happened