Skip to content

Fix the example of Format-Wide -ShowError #1851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions reference/3.0/Microsoft.PowerShell.Utility/Format-Wide.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,18 @@ Accept wildcard characters: True
```

### -ShowError
Sends errors through the pipeline.
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a Format-Wide command, and the expressions do not appear to be working.
The following shows an example of the results of adding the ShowError parameter with an expression.
Indicates that the cmdlet sends errors through the pipeline.
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Wide` command, and the expressions do not appear to be working.
The following shows an example of the results of adding the **ShowError** parameter with an expression.

```powershell
PS C:\> Get-Date | Format-Wide { $_ / $null } -ShowError

PS \> Get-Date | Format-Wide DayOfWeek,{ $_ / $null } -ShowError
DayOfWeek $_ / $null
--------- ------------
Wednesday

Failed to evaluate expression " $_ / $null ".
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) \[\], RuntimeException
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) [], RuntimeException
+ FullyQualifiedErrorId : mshExpressionError
```

```yaml
Type: SwitchParameter
Expand Down
16 changes: 8 additions & 8 deletions reference/4.0/Microsoft.PowerShell.Utility/Format-Wide.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,18 +213,18 @@ Accept wildcard characters: True
```

### -ShowError
Sends errors through the pipeline.
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a Format-Wide command, and the expressions do not appear to be working.
The following shows an example of the results of adding the ShowError parameter with an expression.
Indicates that the cmdlet sends errors through the pipeline.
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Wide` command, and the expressions do not appear to be working.
The following shows an example of the results of adding the **ShowError** parameter with an expression.

```powershell
PS C:\> Get-Date | Format-Wide { $_ / $null } -ShowError

PS \> Get-Date | Format-Wide DayOfWeek,{ $_ / $null } -ShowError
DayOfWeek $_ / $null
--------- ------------
Wednesday

Failed to evaluate expression " $_ / $null ".
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) \[\], RuntimeException
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) [], RuntimeException
+ FullyQualifiedErrorId : mshExpressionError
```

```yaml
Type: SwitchParameter
Expand Down
14 changes: 7 additions & 7 deletions reference/5.0/Microsoft.PowerShell.Utility/Format-Wide.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,17 @@ Accept wildcard characters: False

### -ShowError
Indicates that the cmdlet sends errors through the pipeline.
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a **Format-Wide** command, and the expressions do not appear to be working.
The following shows an example of the results of adding the *ShowError* parameter with an expression.
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Wide` command, and the expressions do not appear to be working.
The following shows an example of the results of adding the **ShowError** parameter with an expression.

```powershell
PS C:\> Get-Date | Format-Wide { $_ / $null } -ShowError

PS \> Get-Date | Format-Wide DayOfWeek,{ $_ / $null } -ShowError
DayOfWeek $_ / $null
--------- ------------
Wednesday

Failed to evaluate expression " $_ / $null ".
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) \[\], RuntimeException
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) [], RuntimeException
+ FullyQualifiedErrorId : mshExpressionError
```

```yaml
Type: SwitchParameter
Expand Down
14 changes: 7 additions & 7 deletions reference/5.1/Microsoft.PowerShell.Utility/Format-Wide.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,17 @@ Accept wildcard characters: False

### -ShowError
Indicates that the cmdlet sends errors through the pipeline.
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a **Format-Wide** command, and the expressions do not appear to be working.
The following shows an example of the results of adding the *ShowError* parameter with an expression.
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Wide` command, and the expressions do not appear to be working.
The following shows an example of the results of adding the **ShowError** parameter with an expression.

```powershell
PS C:\> Get-Date | Format-Wide { $_ / $null } -ShowError

PS \> Get-Date | Format-Wide DayOfWeek,{ $_ / $null } -ShowError
DayOfWeek $_ / $null
--------- ------------
Wednesday

Failed to evaluate expression " $_ / $null ".
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) \[\], RuntimeException
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) [], RuntimeException
+ FullyQualifiedErrorId : mshExpressionError
```

```yaml
Type: SwitchParameter
Expand Down
14 changes: 7 additions & 7 deletions reference/6/Microsoft.PowerShell.Utility/Format-Wide.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,17 @@ Accept wildcard characters: False

### -ShowError
Indicates that the cmdlet sends errors through the pipeline.
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a **Format-Wide** command, and the expressions do not appear to be working.
The following shows an example of the results of adding the *ShowError* parameter with an expression.
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Wide` command, and the expressions do not appear to be working.
The following shows an example of the results of adding the **ShowError** parameter with an expression.

```powershell
PS C:\> Get-Date | Format-Wide { $_ / $null } -ShowError

PS \> Get-Date | Format-Wide DayOfWeek,{ $_ / $null } -ShowError
DayOfWeek $_ / $null
--------- ------------
Wednesday

Failed to evaluate expression " $_ / $null ".
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) \[\], RuntimeException
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) [], RuntimeException
+ FullyQualifiedErrorId : mshExpressionError
```

```yaml
Type: SwitchParameter
Expand Down