private function buildRepository($wurflInfoIterator, $deviceIterator, $patchDeviceIterators = null)
    {
        $this->persistWurflInfo($wurflInfoIterator);
        $patchingDevices = $this->toListOfPatchingDevices($patchDeviceIterators);
        try {
            $this->process($deviceIterator, $patchingDevices);
        } catch (Exception $exception) {
            $this->clean();
            throw new Exception("Problem Building WURFL Repository: " . $exception->getMessage(), 0, $exception);
        }
    }