Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,12 @@ public boolean execute(IProgressMonitor progressMonitor) {
try {
file = org.eclipse.jdt.internal.core.util.Util.toLocalFile(location, progressMonitor);
} catch (CoreException e) {
if (JobManager.VERBOSE) {
trace("-> failed to index " + location.getPath() + " because of the following exception:", e); //$NON-NLS-1$ //$NON-NLS-2$
}
org.eclipse.jdt.internal.core.util.Util.log(e,
"Failed to index " + location.getPath() + ": " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
}
if (file == null) {
if (JobManager.VERBOSE)
trace("-> failed to index " + location.getPath() + " because the file could not be fetched"); //$NON-NLS-1$ //$NON-NLS-2$
org.eclipse.jdt.internal.core.util.Util.log(Status.warning(
"Failed to index " + location.getPath() + " because the file could not be fetched")); //$NON-NLS-1$ //$NON-NLS-2$
return false;
}
if (JavaModelManager.ZIP_ACCESS_VERBOSE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.core.search.SearchParticipant;
Expand Down Expand Up @@ -201,14 +202,11 @@ public boolean execute(IProgressMonitor progressMonitor) {
try {
file = Util.toLocalFile(location, progressMonitor);
} catch (CoreException e) {
if (JobManager.VERBOSE) {
trace("-> failed to index " + location.getPath() + " because of the following exception:", e); //$NON-NLS-1$ //$NON-NLS-2$
}
Util.log(e, "Failed to index " + location.getPath() + ": " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
}
if (file == null) {
if (JobManager.VERBOSE) {
trace("-> failed to index " + location.getPath() + " because the file could not be fetched"); //$NON-NLS-1$ //$NON-NLS-2$
}
Util.log(Status.warning(
"Failed to index " + location.getPath() + " because the file could not be fetched")); //$NON-NLS-1$ //$NON-NLS-2$
return false;
}
fileName = file.getAbsolutePath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -896,9 +896,7 @@ public synchronized Index recreateIndex(IPath containerPath) {
return index;
} catch (IOException e) {
// The file could not be created. Possible reason: the project has been deleted.
if (VERBOSE) {
trace("-> failed to recreate index for path: "+containerPathString, e); //$NON-NLS-1$
}
Util.log(Status.warning("Failed to recreate index for path: " + containerPathString)); //$NON-NLS-1$
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: if you check the call hierarchy of the method, you'll notice that this ends up returning false in these jobs:

image

Which means it is a recoverable error, ergo I just posted a warning.

return null;
}
}
Expand Down Expand Up @@ -1100,9 +1098,7 @@ public synchronized boolean resetIndex(IPath containerPath) {
return true;
} catch (IOException e) {
// The file could not be created. Possible reason: the project has been deleted.
if (VERBOSE) {
trace("-> failed to reset index for path: "+containerPathString, e); //$NON-NLS-1$
}
Util.log(Status.warning("Failed to reset index for path: " + containerPathString)); //$NON-NLS-1$
return false;
}
}
Expand Down Expand Up @@ -1673,9 +1669,7 @@ void updateMetaIndex(String indexFileName, List<IndexQualifier> qualifications)
trace("-> meta-index updated for " + indexFileName); //$NON-NLS-1$
}
} catch (IOException e) {
if (JobManager.VERBOSE) {
trace("-> failed to update meta index for index " + indexFileName + " because of the following exception:", e); //$NON-NLS-1$ //$NON-NLS-2$
}
Util.log(e, "Failed to update meta index for index " + indexFileName + ": " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
} finally {
if(monitor != null) {
monitor.exitWrite();
Expand Down Expand Up @@ -1757,10 +1751,7 @@ public boolean execute(IProgressMonitor progress) {
if (cause != null) {
Util.log(e, "Failed to update meta index"); //$NON-NLS-1$
} else {
if (JobManager.VERBOSE) {
trace("-> failed to update meta index for index " + indexFile.getName() //$NON-NLS-1$
+ " because of the following exception:", e); //$NON-NLS-1$
}
Util.log(e, "Failed to update meta index for index " + indexFile.getName() + ": " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
Expand Down
Loading