Run the following to test this issue:
$Prompt.Add( { try{throw "error"}catch{} } )
The result is a WARNING:
WARNING: Exception thrown from prompt block. Check $PromptErrors. To suppress this message, Set-PowerLine -HideError
WARNING: Exception in PowerLinePrompt
$PromptErrors contains:
Name : 3 { try{throw "error"}catch{} }
Value : {System.Management.Automation.RuntimeException}
- PowerLine Module Version 3.4.0
- Pansies Module Version 2.3.1
Tested on:
- Arch Linux with PowerShell Core 7.1.5
- Windows 10 with PowerShell 5.1.19041.1237
Expected behavior:
- When an exception is captured, the error should not be displayed.