move temporary error handler generator to Util\ErrorHandler::handleErrorOnce()