Open StartAutomating opened 1 month ago
Obviously, the whole point of the module is for the ErrorView to be easy to customize, and I think it already is:
ConvertTo-WhateverErrorview
that takes n $InputObject
parameter of type [System.Management.Automation.ErrorRecord]
Set-ErrorView Whatever
or Import-Module ErrorView -Args Whatever
Additionally, the module already supports an ErrorView argument at import, and although it would be simple to make that consider an environment variable, I'm not sure I see the need, since you have to define a function anyway.
I can't imagine any useful way to format an error with a single string, so would you care to give an example?
It would be nice if the error view was easy to customize.
Here's a slight suggestion as to how:
If
$env:ErrorView
is set, it should be treated as an expandable PowerShell string.If it is present, it should take precedence over #2 and #3 .