-
-
Notifications
You must be signed in to change notification settings - Fork 13
Introduce InvalidMethodParametersException to handle cases where inva… #73
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
…lid parameters are provided to WMI methods.
…cuteMethod overloads in WmiConnection.cs to clarify that these methods may throw this exception when WMI method parameters are invalid.
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.
Pull request overview
This pull request introduces a new custom exception type InvalidMethodParametersException to provide better error handling when invalid parameters are passed to WMI methods. The change improves error diagnostics by catching the specific WBEM_E_INVALID_METHOD_PARAMETERS HRESULT and wrapping it in a more descriptive exception.
Key changes:
- Created a new
InvalidMethodParametersExceptionclass that extendsWmiException - Updated
WbemServices.ExecuteMethodto catch and throw this specific exception - Added XML documentation for the new exception across all
ExecuteMethodoverloads inWmiConnection
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| WmiLight/Exceptions/InvalidMethodParametersException.cs | New exception class for handling invalid WMI method parameters with descriptive error message |
| WmiLight/Wbem/WbemServices.cs | Updated exception handling to detect and throw InvalidMethodParametersException when parameters are invalid |
| WmiLight/WmiConnection.cs | Added XML documentation for the new exception across all 8 ExecuteMethod method overloads |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…names, and its message includes both for improved context.
…ts usages with InvalidParameterException.
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.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…lid parameters are provided to WMI methods.