-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Implement RFC 277: native error throwing #15897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
test/powershell/engine/Basic/NativeCommandErrorHandling.Tests.ps1
Outdated
Show resolved
Hide resolved
| continue | ||
| } | ||
|
|
||
| $hitTrap = $false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we explicitly create $exception in the scope too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it'll be $null by default, rather than $false, so we don't really need to
|
🎉 Handy links: |
PR Summary
Continuation of @rkeithhill's work in #15757.
Implements error throwing with error action preference integration for native executables, similar to
set -escenarios on *nix.PR Context
See on PowerShell/PowerShell-RFC#277.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.PSNativeCommandErrorActionPreference(which runs in a different PS Host).