Steps to reproduce
$exception = [ComponentModel.Win32Exception]::new(0x8007007a)
# Send to output normally
$exception
# Throw
throw $exception
Expected behavior
Both the output stream exception and the ErrorRecord wrapped thrown exception to look similar, or at the very least display the Exception.Message text.
# Output stream
The data area passed to a system call is too small.
# Error stream
OperationStopped: The data area passed to a system call is too small.
Actual behavior
# Output stream
Error:
# Error stream
OperationStopped: The data area passed to a system call is too small.
Environment data
Name Value
---- -----
PSVersion 7.0.0-rc.1
PSEdition Core
GitCommitId 7.0.0-rc.1
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Including screenshot since the "Actual behavior" section looks potentially confusing on this one:

Steps to reproduce
Expected behavior
Both the output stream exception and the
ErrorRecordwrapped thrown exception to look similar, or at the very least display theException.Messagetext.Actual behavior
Environment data
Including screenshot since the "Actual behavior" section looks potentially confusing on this one: