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

Include workspace kind in error message for easier diagnostics #75137

Merged
merged 1 commit into from
Sep 21, 2024
Merged
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 @@ -64,7 +64,10 @@ public TLanguageService GetRequiredService<TLanguageService>() where TLanguageSe
var service = GetService<TLanguageService>();
if (service == null)
{
throw new InvalidOperationException(string.Format(WorkspacesResources.Service_of_type_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_workspace, typeof(TLanguageService)));
throw new InvalidOperationException(
string.Format(WorkspacesResources.Service_of_type_0_is_required_to_accomplish_the_task_but_is_not_available_from_1_workspace,
typeof(TLanguageService),
WorkspaceServices.Workspace.Kind));
}

return service;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ public TWorkspaceService GetRequiredService<TWorkspaceService>() where TWorkspac
var service = GetService<TWorkspaceService>();
if (service == null)
{
throw new InvalidOperationException(string.Format(WorkspacesResources.Service_of_type_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_workspace, typeof(TWorkspaceService).FullName));
throw new InvalidOperationException(
string.Format(WorkspacesResources.Service_of_type_0_is_required_to_accomplish_the_task_but_is_not_available_from_1_workspace,
typeof(TWorkspaceService),
Workspace.Kind));
}

return service;
Expand Down
4 changes: 2 additions & 2 deletions src/Workspaces/Core/Portable/WorkspacesResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@
<data name="Removing_project_references_is_not_supported" xml:space="preserve">
<value>Removing project references is not supported.</value>
</data>
<data name="Service_of_type_0_is_required_to_accomplish_the_task_but_is_not_available_from_the_workspace" xml:space="preserve">
<value>Service of type '{0}' is required to accomplish the task but is not available from the workspace.</value>
<data name="Service_of_type_0_is_required_to_accomplish_the_task_but_is_not_available_from_1_workspace" xml:space="preserve">
<value>Service of type '{0}' is required to accomplish the task but is not available from '{1}' workspace.</value>
</data>
<data name="At_least_one_diagnostic_must_be_supplied" xml:space="preserve">
<value>At least one diagnostic must be supplied.</value>
Expand Down
10 changes: 5 additions & 5 deletions src/Workspaces/Core/Portable/xlf/WorkspacesResources.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Workspaces/Core/Portable/xlf/WorkspacesResources.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Workspaces/Core/Portable/xlf/WorkspacesResources.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Workspaces/Core/Portable/xlf/WorkspacesResources.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Workspaces/Core/Portable/xlf/WorkspacesResources.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Workspaces/Core/Portable/xlf/WorkspacesResources.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Workspaces/Core/Portable/xlf/WorkspacesResources.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Workspaces/Core/Portable/xlf/WorkspacesResources.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Workspaces/Core/Portable/xlf/WorkspacesResources.pt-BR.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/Workspaces/Core/Portable/xlf/WorkspacesResources.ru.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading