|
Lines 121-127
Link Here
|
| 121 |
lastModifiedRemote = getTransport().getLastModified(jarLocation, submonitor.newChild(1)); |
121 |
lastModifiedRemote = getTransport().getLastModified(jarLocation, submonitor.newChild(1)); |
| 122 |
if (lastModifiedRemote <= 0) |
122 |
if (lastModifiedRemote <= 0) |
| 123 |
LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Server returned lastModified <= 0 for " + jarLocation)); //$NON-NLS-1$ |
123 |
LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Server returned lastModified <= 0 for " + jarLocation)); //$NON-NLS-1$ |
| 124 |
|
|
|
| 125 |
} catch (Exception e) { |
124 |
} catch (Exception e) { |
| 126 |
// not ideal, just skip the jar on error, and try the xml instead - report errors for |
125 |
// not ideal, just skip the jar on error, and try the xml instead - report errors for |
| 127 |
// the xml. |
126 |
// the xml. |
|
Lines 154-160
Link Here
|
| 154 |
} catch (AuthenticationFailedException e) { |
153 |
} catch (AuthenticationFailedException e) { |
| 155 |
throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.CacheManager_AuthenticationFaileFor_0, repositoryLocation), e)); |
154 |
throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.CacheManager_AuthenticationFaileFor_0, repositoryLocation), e)); |
| 156 |
} catch (CoreException e) { |
155 |
} catch (CoreException e) { |
| 157 |
throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.CacheManager_FailedCommunicationWithRepo_0, repositoryLocation), e)); |
156 |
IStatus status = e.getStatus(); |
|
|
157 |
if (status == null) |
| 158 |
throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.CacheManager_FailedCommunicationWithRepo_0, repositoryLocation), e)); |
| 159 |
else if (status.getException() instanceof FileNotFoundException) |
| 160 |
throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null)); |
| 161 |
throw new ProvisionException(status); |
| 158 |
|
162 |
|
| 159 |
} |
163 |
} |
| 160 |
// There is an xml, and it should be used - cache is stale if it is jar based or |
164 |
// There is an xml, and it should be used - cache is stale if it is jar based or |