- Notifications
You must be signed in to change notification settings - Fork7.7k
FixGet-ItemProperty
to report non-terminating error for cast exception#21115
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
FixGet-ItemProperty
to report non-terminating error for cast exception#21115
Uh oh!
There was an error while loading.Please reload this page.
Conversation
test/powershell/Modules/Microsoft.PowerShell.Management/Registry.Tests.ps1 OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
@ArmaanMcleod We need to skip new test code on Windows. |
ArmaanMcleod commentedJan 20, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@iSazonov Do you mean we should skip if not windows and powershell core? Makes sense if this is for new test it should only work for powershell core on windows. I've added conditions to lock tests to windows only. |
test/powershell/Modules/Microsoft.PowerShell.Management/Registry.Tests.ps1 OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
test/powershell/Modules/Microsoft.PowerShell.Management/Registry.Tests.ps1 OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This PR has Quantification details
Why proper sizing of changes mattersOptimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful?👍 :ok_hand: :thumbsdown: (Email) |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
b5fbe9e
intoPowerShell:masterUh oh!
There was an error while loading.Please reload this page.
microsoft-github-policy-servicebot commentedDec 27, 2024 • edited by unfurl-linksbot
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by unfurl-linksbot
Uh oh!
There was an error while loading.Please reload this page.
📣 Hey@ArmaanMcleod, how did we do? We would love to hear your feedback with the link below! 🗣️ 🔗https://aka.ms/PSRepoFeedback |
PR Summary
Fixes#9552
Adds catch for
InvalidCastException
so non-terminating error gets reported instead of terminating error when listing subkeys with 64 bit integer in 32 bit DWORD.PR Context
Currently if you do this you get a terminating error for the cast and command is halted. With this exception handling we can now get non-terminating error and also suppress error with
-ErrorAction SilentlyContinue
.Get-ItemProperty
will continue to enumerate subkeys even if an invalid one is found.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.(which runs in a different PS Host).