You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Catch/ignore/handle exceptions from FileSystemGlobbing #463
There seem to be quite a few of exceptions coming out of FileSystemGlobbing, which is only used inside of LoadDirectoryFiles. Most frequent is an UnauthorizedAccessException:
at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, EnumerationOptions options)
at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options)
at System.IO.Enumeration.FileSystemEnumerableFactory.FileSystemInfos(String directory, String expression, EnumerationOptions options)
at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at Microsoft.Extensions.FileSystemGlobbing.Abstractions.DirectoryInfoWrapper.EnumerateFileSystemInfos()+MoveNext()
at System.Collections.Generic.List`1.AddEnumerable(IEnumerable`1 enumerable)
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at Microsoft.Extensions.FileSystemGlobbing.Internal.MatcherContext.Match(DirectoryInfoBase directory, S
But we also see DirectoryNotFoundException, IOException, PathTooLongException, and FileNotFoundException.
Right now, these exceptions during workspace/didChangeConfiguration go unhandled, produce an error message for the user via RPC, and record the exception.
DirectoryNotFoundException is IOException as is FileNotFoundException. Basically IO produces IOException, UnauthorizedAccessException and ArgumentException.
Activity
MikhailArkhipov commentedon Dec 6, 2018
DirectoryNotFoundExceptionisIOExceptionas isFileNotFoundException. Basically IO producesIOException,UnauthorizedAccessExceptionandArgumentException.jakebailey commentedon Dec 22, 2018
Fixed in #498.