-
Notifications
You must be signed in to change notification settings - Fork 103
Bug/v4 get se element error management #145
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
Conversation
Public/Get-SeElement.ps1
Outdated
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.
What do you think about using [System.Management.Automation.ItemNotFoundException]
instead?
IMO InvalidOperation
is generally used for things that would never work and can communicate that user input is somehow completely unusable, which doesn't feel like is the case here. 🙂
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.
@vexx32 Yes, I like yours better.
I used InvalidOperation because that's what the native call produced and didn't have ItemNotFound exception in mind.
Making the change right now.
#135