diff --git a/src/Microsoft.PowerShell.CoreConsoleHost/ui.cs b/src/Microsoft.PowerShell.CoreConsoleHost/ui.cs index 05d02188d..768a85c01 100644 --- a/src/Microsoft.PowerShell.CoreConsoleHost/ui.cs +++ b/src/Microsoft.PowerShell.CoreConsoleHost/ui.cs @@ -82,7 +82,7 @@ namespace Microsoft.PowerShell.CoreConsoleHost } else { - throw new InvalidOperationException("Cannot prompt user when invoked with --noninteractive option."); + throw new PSInvalidOperationException("Cannot prompt user when invoked with --noninteractive option."); } } @@ -162,7 +162,7 @@ namespace Microsoft.PowerShell.CoreConsoleHost } else { - throw new InvalidOperationException("Cannot prompt user when invoked with --noninteractive option."); + throw new PSInvalidOperationException("Cannot prompt user when invoked with --noninteractive option."); } } @@ -273,7 +273,7 @@ namespace Microsoft.PowerShell.CoreConsoleHost } else { - throw new InvalidOperationException("Cannot prompt user when invoked with --noninteractive option."); + throw new PSInvalidOperationException("Cannot prompt user when invoked with --noninteractive option."); } }