View | Details | Raw Unified | Return to bug 139056 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/update/core/Utilities.java (-2 / +8 lines)
Lines 221-233 Link Here
221
			status = new Status(IStatus.ERROR, id, code, completeString.toString(), e);
221
			status = new Status(IStatus.ERROR, id, code, completeString.toString(), e);
222
		}
222
		}
223
		CoreException ce = new CoreException(status);
223
		CoreException ce = new CoreException(status);
224
		if ( e instanceof CoreException) {
224
		
225
		if ( e instanceof FatalIOException) {
226
			ce = new CoreExceptionWithRootCause(status);
227
			((CoreExceptionWithRootCause)ce).setRootException(e);
228
		}
229
		/* for when we move to 1.5
230
		 if ( e instanceof CoreException) {
225
			ce.initCause(e.getCause());
231
			ce.initCause(e.getCause());
226
		} else {
232
		} else {
227
			ce.initCause(e);
233
			ce.initCause(e);
228
		}
234
		}
229
		if (e != null)
235
		if (e != null)
230
			ce.setStackTrace(e.getStackTrace());
236
			ce.setStackTrace(e.getStackTrace());*/
231
		return ce; 
237
		return ce; 
232
	}
238
	}
233
239
(-).settings/org.eclipse.jdt.core.prefs (-1 / +2 lines)
Lines 1-5 Link Here
1
#Mon May 01 09:58:55 EDT 2006
1
#Thu May 04 13:48:45 EDT 2006
2
eclipse.preferences.version=1
2
eclipse.preferences.version=1
3
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
3
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
4
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
4
org.eclipse.jdt.core.compiler.compliance=1.4
5
org.eclipse.jdt.core.compiler.compliance=1.4
5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
(-)src/org/eclipse/update/internal/mirror/MirrorSite.java (-2 / +9 lines)
Lines 44-49 Link Here
44
import org.eclipse.update.core.model.CategoryModel;
44
import org.eclipse.update.core.model.CategoryModel;
45
import org.eclipse.update.core.model.SiteModelFactory;
45
import org.eclipse.update.core.model.SiteModelFactory;
46
import org.eclipse.update.core.model.URLEntryModel;
46
import org.eclipse.update.core.model.URLEntryModel;
47
import org.eclipse.update.internal.core.CoreExceptionWithRootCause;
47
import org.eclipse.update.internal.core.FatalIOException;
48
import org.eclipse.update.internal.core.FatalIOException;
48
import org.eclipse.update.internal.core.ISiteContentConsumer;
49
import org.eclipse.update.internal.core.ISiteContentConsumer;
49
import org.eclipse.update.internal.core.UpdateCore;
50
import org.eclipse.update.internal.core.UpdateCore;
Lines 246-252 Link Here
246
			try {
247
			try {
247
				provider.getPluginEntryArchiveReferences(pluginsToInstall[i], null);
248
				provider.getPluginEntryArchiveReferences(pluginsToInstall[i], null);
248
			} catch (CoreException ce) {
249
			} catch (CoreException ce) {
249
				if ( ignoreNonPresentPlugins && (ce.getCause() != null) && (ce.getCause() instanceof FatalIOException) ) {
250
				if ( ignoreNonPresentPlugins && 
251
						(ce instanceof CoreExceptionWithRootCause) &&
252
						(((CoreExceptionWithRootCause)ce).getRootException() != null) && 
253
						(((CoreExceptionWithRootCause)ce).getRootException() instanceof FatalIOException) ) {
250
					System.out.println("Could not mirror plug-in " + pluginsToInstall[i].getVersionedIdentifier().toString() + ". It does not exist on the given site");  //$NON-NLS-1$//$NON-NLS-2$
254
					System.out.println("Could not mirror plug-in " + pluginsToInstall[i].getVersionedIdentifier().toString() + ". It does not exist on the given site");  //$NON-NLS-1$//$NON-NLS-2$
251
				} else {
255
				} else {
252
					throw ce;
256
					throw ce;
Lines 293-299 Link Here
293
				storePluginArchive(references[0]);
297
				storePluginArchive(references[0]);
294
				addDownloadedPluginEntry(pluginsToInstall[i]);
298
				addDownloadedPluginEntry(pluginsToInstall[i]);
295
			} catch (CoreException ce) {
299
			} catch (CoreException ce) {
296
				if ( ignoreNonPresentPlugins && (ce.getCause() != null) && (ce.getCause() instanceof FatalIOException) ) {
300
				if ( ignoreNonPresentPlugins && 
301
						(ce instanceof CoreExceptionWithRootCause) &&
302
						(((CoreExceptionWithRootCause)ce).getRootException() != null) && 
303
						(((CoreExceptionWithRootCause)ce).getRootException() instanceof FatalIOException) ) {
297
					System.out.println("Could not write plug-in " + pluginsToInstall[i].getVersionedIdentifier().toString() + ". It does not exist on the given site"); //$NON-NLS-1$ //$NON-NLS-2$
304
					System.out.println("Could not write plug-in " + pluginsToInstall[i].getVersionedIdentifier().toString() + ". It does not exist on the given site"); //$NON-NLS-1$ //$NON-NLS-2$
298
				} else {
305
				} else {
299
					//System.out.println("ignoreNonPresentPlugins:"+ignoreNonPresentPlugins); //$NON-NLS-1$
306
					//System.out.println("ignoreNonPresentPlugins:"+ignoreNonPresentPlugins); //$NON-NLS-1$
(-).settings/org.eclipse.jdt.ui.prefs (+3 lines)
Added Link Here
1
#Thu May 04 13:48:18 EDT 2006
2
eclipse.preferences.version=1
3
internal.default.compliance=default
(-)src/org/eclipse/update/internal/core/CoreExceptionWithRootCause.java (+25 lines)
Added Link Here
1
package org.eclipse.update.internal.core;
2
3
import org.eclipse.core.runtime.CoreException;
4
import org.eclipse.core.runtime.IStatus;
5
6
public class CoreExceptionWithRootCause extends CoreException {
7
8
	private static final long serialVersionUID = 6832993239926767403L;
9
	
10
	private Throwable e = null;
11
	
12
	public CoreExceptionWithRootCause(IStatus status) {
13
		super(status);
14
	}
15
16
	public void setRootException(Throwable e) {
17
		this.e = e;	
18
	}
19
20
	public Throwable getRootException() {
21
		return e;
22
	}
23
24
	
25
}

Return to bug 139056