} else { log.debug("Unable to upload file to " + url + "\n" + coreResponse.getStatusLine()); selectedUrl = failAndGetNextUrl(context); if (selectedUrl == null) throw new FileStorageException(FileStorageException.Type.fromHttpStatus(statusCode), fd.getName()); } catch (IOException e) { log.debug("Unable to upload file to " + url + "\n" + e); selectedUrl = failAndGetNextUrl(context); if (selectedUrl == null) throw new FileStorageException(FileStorageException.Type.IO_EXCEPTION, fd.getName(), e);