-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add New-Exception
, and PassThru
parameter to exception commands
#115
Conversation
New-Exception
, and PassThru
parameter to exception commands
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.
Reviewed 12 of 12 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion
source/Public/New-ObjectNotFoundException.ps1
line 52 at r1 (raw file):
if ($null -eq $ErrorRecord) { $exception = New-Object -TypeName 'System.Exception' `
We can use the New-Exception
for this instead? Also for New-InvalidResultException
x.
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.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @johlju)
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.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @johlju)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #115 +/- ##
===================================
Coverage 91% 91%
===================================
Files 37 38 +1
Lines 664 668 +4
===================================
+ Hits 609 613 +4
Misses 55 55
|
Pull Request (PR) description
command documentation now is in the wiki.
New-Exception
[System.Exception]
.New-ArgumentException
PassThru
that returns the error record that wascreated (and does not throw).
New-InvalidArgumentException
and the commandwas renamed to match the exception name.
New-InvalidOperationException
PassThru
that returns the error record that wascreated (and does not throw) (issue #98).
New-InvalidResultException
PassThru
that returns the error record that wascreated (and does not throw).
New-NotImplementedException
PassThru
that returns the error record that wasNew-InvalidDataException
Message
has a parameter aliasErrorMessage
to makethe command have the same parameter names as the other
New-*Exception
commands.
New-ObjectNotFoundException
This Pull Request (PR) fixes the following issues
New-InvalidOperationException
: Suggest adding aPassThru
parameter #98Task list
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
DSC Community Testing Guidelines.
This change is