@@ -60,7 +60,7 @@ private sealed partial class ExtensionMessageHandlerService(
6060 private static string GetAssemblyFolderPath ( string assemblyFilePath )
6161 {
6262 return Path . GetDirectoryName ( assemblyFilePath )
63- ?? throw new InvalidOperationException ( $ "Unable to get the directory name for { assemblyFilePath } ." ) ;
63+ ?? throw new InvalidOperationException ( string . Format ( FeaturesResources . Unable_to_get_the_directory_name_for_0 , assemblyFilePath ) ) ;
6464 }
6565
6666 private void ClearCachedHandlers_WhileUnderLock ( )
@@ -114,7 +114,7 @@ private ValueTask UnregisterExtensionInCurrentProcessAsync(string assemblyFilePa
114114 lock ( _gate )
115115 {
116116 if ( ! _folderPathToExtensionFolder . TryGetValue ( assemblyFolderPath , out var extensionFolder ) )
117- throw new InvalidOperationException ( $ "No extension registered as ' { assemblyFolderPath } '" ) ;
117+ throw new InvalidOperationException ( string . Format ( FeaturesResources . No_extension_registered_as_0 , assemblyFolderPath ) ) ;
118118
119119 // Clear out the cached handler names. They will be recomputed the next time we need them.
120120 ClearCachedHandlers_WhileUnderLock ( ) ;
@@ -174,7 +174,7 @@ private async ValueTask<ExtensionMessageNames> GetExtensionMessageNamesInCurrent
174174 // Throwing here indicates a bug in the gladstone client itself. So we want this to bubble outwards as a
175175 // failure that disables extension running in the OOP process. This must be fixed by gladstone.
176176 if ( ! _folderPathToExtensionFolder . TryGetValue ( assemblyFolderPath , out var extensionFolder ) )
177- throw new InvalidOperationException ( $ "No extensions registered at ' { assemblyFolderPath } '" ) ;
177+ throw new InvalidOperationException ( string . Format ( FeaturesResources . No_extensions_registered_at_0 , assemblyFolderPath ) ) ;
178178
179179 // Note if loading the extension assembly failed (due to issues in the extension itself), then the exception
180180 // produced by it will be passed outwards as data in the ExtensionMessageNames result.
@@ -219,14 +219,14 @@ private async ValueTask<ExtensionMessageResult> HandleExtensionMessageInCurrentP
219219 // bug in the gladstone client itself (as it allowed calling into an lsp message that never had
220220 // registered handlers). So we want this to bubble outwards as a failure that disables extension
221221 // running in the OOP process. This must be fixed by gladstone.
222- throw new InvalidOperationException ( $ "No handler found for message { messageName } ." ) ;
222+ throw new InvalidOperationException ( string . Format ( FeaturesResources . No_handler_found_for_message_0 , messageName ) ) ;
223223 }
224224
225225 // Throwing here indicates a bug in the gladstone client itself (as it allowed calling into an lsp message
226226 // that had multiple registered handlers). So we want this to bubble outwards as a failure that disables
227227 // extension running in the OOP process. This must be fixed by gladstone.
228228 if ( handlers . Length > 1 )
229- throw new InvalidOperationException ( $ "Multiple handlers found for message { messageName } ." ) ;
229+ throw new InvalidOperationException ( string . Format ( FeaturesResources . Multiple_handlers_found_for_message_0 , messageName ) ) ;
230230
231231 var handler = ( IExtensionMessageHandlerWrapper < TArgument > ) handlers [ 0 ] ;
232232
0 commit comments