Implement RFC 277: native error throwing #15897
Conversation
src/System.Management.Automation/engine/NativeCommandProcessor.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/NativeCommandProcessor.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/NativeCommandProcessor.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/NativeCommandProcessor.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/NativeCommandProcessor.cs
Outdated
Show resolved
Hide resolved
test/powershell/engine/Basic/NativeCommandErrorHandling.Tests.ps1
Outdated
Show resolved
Hide resolved
continue | ||
} | ||
|
||
$hitTrap = $false |
iSazonov
Aug 24, 2021
Collaborator
Should we explicitly create $exception in the scope too?
Should we explicitly create $exception in the scope too?
rjmholt
Aug 24, 2021
Author
Member
Well it'll be $null
by default, rather than $false
, so we don't really need to
Well it'll be $null
by default, rather than $false
, so we don't really need to
a4d1457
into
PowerShell:master
PR Summary
Continuation of @rkeithhill's work in #15757.
Implements error throwing with error action preference integration for native executables, similar to
set -e
scenarios on *nix.PR Context
See on PowerShell/PowerShell-RFC#277.
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.PSNativeCommandErrorActionPreference
(which runs in a different PS Host).