Skip to content

Commit

Permalink
Improve error handling for the language server
Browse files Browse the repository at this point in the history
  • Loading branch information
thedemons committed Dec 16, 2023
1 parent 1b846dc commit fa098df
Show file tree
Hide file tree
Showing 9 changed files with 738 additions and 439 deletions.
1 change: 1 addition & 0 deletions CodeiumVS/CodeiumVS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
<Compile Include="QuickInfo\IntellisenseController.cs" />
<Compile Include="QuickInfo\QuickInfoSource.cs" />
<Compile Include="Utilities\Extensions.cs" />
<Compile Include="Utilities\FileUtilities.cs" />
<Compile Include="Utilities\IntellisenseUtilities.cs" />
<Compile Include="Utilities\ProcessExtensions.cs" />
<Compile Include="Utilities\TextHighlighter.cs" />
Expand Down
6 changes: 3 additions & 3 deletions CodeiumVS/CodeiumVSPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static string CleanifyBrowserPath(string p)
}

// Try three different ways to open url in the default browser
public void OpenInBrowser(string url)
public static void OpenInBrowser(string url)
{
Action<string>[] methods = [
(_url) => {
Expand All @@ -215,11 +215,11 @@ public void OpenInBrowser(string url)
}
catch (Exception ex)
{
Log($"Could not open in browser, encountered an exception: {ex}\n Retrying using another method");
Instance?.Log($"Could not open in browser, encountered an exception: {ex}\n Retrying using another method");
}
}

Log($"Codeium failed to open the browser, please use this URL instead: {url}");
Instance?.Log($"Codeium failed to open the browser, please use this URL instead: {url}");
VS.MessageBox.Show("Codeium: Failed to open browser", $"Please use this URL instead (you can copy from the output window):\n{url}");
}

Expand Down
Loading

0 comments on commit fa098df

Please sign in to comment.