Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception as seen in the unit test execution #598

Merged
merged 1 commit into from
Apr 5, 2023
Merged
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
3 changes: 2 additions & 1 deletion org.eclipse.lsp4e/src/org/eclipse/lsp4e/LSPEclipseUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceStatus;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourceAttributes;
import org.eclipse.core.resources.ResourcesPlugin;
Expand Down Expand Up @@ -1167,7 +1168,7 @@ public static List<IContentType> getDocumentContentTypes(@NonNull IDocument docu
contentTypes.add(contentType);
}
} catch (CoreException e) {
if (!(e.getCause() instanceof java.io.FileNotFoundException)) {
if (!(e.getCause() instanceof java.io.FileNotFoundException) && e.getStatus().getCode() != IResourceStatus.RESOURCE_NOT_FOUND) {
//the content type may be based on path or file name pattern or another subsystem via the ContentTypeManager
// so that is not an error condition
//otherwise, account for some other unknown CoreException
Expand Down