Skip to content

Commit

Permalink
Add try catch around indexing (#152)
Browse files Browse the repository at this point in the history
* fix

* version
  • Loading branch information
saranshsaini authored Dec 24, 2024
1 parent 4951489 commit 5ab518d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
25 changes: 20 additions & 5 deletions CodeiumVS/LanguageServer/LanguageServer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using CodeiumVS.Packets;
using CodeiumVS.Packets;
using EnvDTE;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Imaging;
Expand Down Expand Up @@ -854,17 +854,32 @@ async Task AddFilesToIndexLists(EnvDTE.Project project)

foreach (EnvDTE.ProjectItem item in project.ProjectItems)
{
if (item.SubProject != null)
try
{
await AddFilesToIndexLists(item.SubProject);

if (item.SubProject != null)
{
await AddFilesToIndexLists(item.SubProject);
}
}
catch (Exception ex)
{
await _package.LogAsync($"Failed to process sub-project: {ex.Message}");
continue;
}
}
}

foreach (EnvDTE.Project project in dte.Solution.Projects)
{
await AddFilesToIndexLists(project);
try
{
await AddFilesToIndexLists(project);
}
catch (Exception ex)
{
await _package.LogAsync($"Failed to process project: {ex.Message}");
continue;
}
}
List<string> result = new List<string>();
result.AddRange(specifiedProjectsToIndexPath);
Expand Down
2 changes: 1 addition & 1 deletion CodeiumVS/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="Codeium.VisualStudio" Version="1.8.93" Language="en-US" Publisher="Codeium" />
<Identity Id="Codeium.VisualStudio" Version="1.8.94" Language="en-US" Publisher="Codeium" />
<DisplayName>Codeium</DisplayName>
<Description xml:space="preserve">The modern coding superpower: free AI code acceleration plugin for your favorite languages. Type less. Code more. Ship faster.</Description>
<MoreInfo>https://www.codeium.com</MoreInfo>
Expand Down

0 comments on commit 5ab518d

Please sign in to comment.