Skip to content

Commit

Permalink
Catch NotSupportedException which can be thrown by FilleStream ctor (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rkeithhill authored and TylerLeonhardt committed Mar 20, 2019
1 parent d6bd5b1 commit a9005d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PowerShellEditorServices/Workspace/Workspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ public bool TryGetFile(string filePath, out ScriptFile scriptFile)
return true;
}
catch (Exception e) when (
e is IOException ||
e is SecurityException ||
e is NotSupportedException ||
e is FileNotFoundException ||
e is DirectoryNotFoundException ||
e is PathTooLongException ||
e is IOException ||
e is SecurityException ||
e is UnauthorizedAccessException)
{
this.logger.WriteHandledException($"Failed to get file for {nameof(filePath)}: '{filePath}'", e);
Expand Down

0 comments on commit a9005d8

Please sign in to comment.