We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba52e84 commit 529c54dCopy full SHA for 529c54d
src/PowerShellEditorServices/Services/PowerShell/Utility/ErrorRecordExtensions.cs
@@ -24,11 +24,14 @@ static ErrorRecordExtensions()
24
25
var errorObjectParameter = Expression.Parameter(typeof(PSObject));
26
27
+ // Generates a call like:
28
+ // $errorPSObject.WriteStream = [System.Management.Automation.WriteStreamType]::Error
29
+ // So that error record PSObjects will be rendered in the console properly
30
s_setWriteStreamProperty = Expression.Lambda<Action<PSObject>>(
31
Expression.Call(
32
errorObjectParameter,
33
writeStreamProperty.GetSetMethod(),
- Expression.Constant(errorStreamType)),
34
+ Expression.Constant(errorStreamType)),
35
errorObjectParameter)
36
.Compile();
37
}
0 commit comments