Skip to content
ConsoleMonster
Cmdlet

Write-ConsoleException

Module ConsoleMonster
Inputs
System.Object

Writes an error or exception readably (Format-ConsoleError without -AsWidget).

Syntax

Write-ConsoleException [[-InputObject] <Object>] [-MaxFrames <Int32>] [-NoStack] [-ShowFrameworkFrames] [-Width <Int32>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Writes an error or exception readably (Format-ConsoleError without -AsWidget).

The same view as Format-ConsoleError: type, message, position, script stack, frames with file:line links, collapsed framework frames and inner errors.

Examples

Authored help example

EXAMPLE 1

Write-ConsoleException -InputObject 'Value'

Parameters

-InputObject Object optionalposition: 0pipeline: True (ByValue)
An ErrorRecord, an exception or a message (pipeline input).
-MaxFrames Int32 optional
The most app frames shown per error (default 8).
-NoStack SwitchParameter optional
Leaves out the stack frames: type, message and position only.
-ShowFrameworkFrames SwitchParameter optional
Shows framework frames (System, Microsoft, the PowerShell engine) instead of collapsing them.
-Width Int32 optional
Lays the output out for this width instead of the terminal's.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.