File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/PowerShellEditorServices/Language Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1313using System . Management . Automation ;
1414using System . Management . Automation . Language ;
1515using System . Runtime . InteropServices ;
16+ using System . Security ;
1617using System . Threading ;
1718using System . Threading . Tasks ;
1819
@@ -346,9 +347,14 @@ public async Task<FindReferencesResult> FindReferencesOfSymbol(
346347 {
347348 scriptFile = workspace . GetFile ( file ) ;
348349 }
349- catch ( IOException )
350+ catch ( Exception e ) when ( e is IOException
351+ || e is SecurityException
352+ || e is FileNotFoundException
353+ || e is DirectoryNotFoundException
354+ || e is PathTooLongException
355+ || e is UnauthorizedAccessException )
350356 {
351- // If the file has ceased to exist for some reason, we just skip it
357+ // If we can't access the file for some reason, just ignore it
352358 continue ;
353359 }
354360
You can’t perform that action at this time.
0 commit comments