Skip to content
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

Fixed typos, split ErrorRecord describe into two Contexts #199

Merged
merged 9 commits into from Jun 9, 2019
Merged

Fixed typos, split ErrorRecord describe into two Contexts #199

merged 9 commits into from Jun 9, 2019

Conversation

ghost
Copy link

@ghost ghost commented Jun 7, 2019

PR Summary

Resolves #196

Context

Couple of minor typos corrected. Big change to the Describe ErrorRecord koan as there was a mix of $Error and $ErrorRecord. Splitting them into separate contexts seems a more intuitive approach for the user.

Changes

  • Split the Describe ErrorRecord into Context $Error and Context ErrorAssignments.
  • Fixed typo where Test-SimpleWriteError should be Write-SimpleError

Checklist

  • Pull Request has a meaningful title.
  • Summarized changes.
  • Pull Request is ready to merge & is not WIP.
  • Added tests / only testable interactively.
    • Make sure you add a new test if old tests do not effectively test the code changed.
  • Added documentation / opened issue to track adding documentation at a later date.

@ghost ghost requested review from steviecoaster and vexx32 as code owners June 7, 2019 03:21
Copy link
Owner

@vexx32 vexx32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Mostly minor issues I'm picking up here, but overall it looks a lot more clear.

Thank you!! 💖

$_
It 'sometimes has a reference to the object that caused the error' {
# But not always!
$Error[0].TargetObject | Should -BeNullOrEmpty
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can have this as part of a separate test case that throws an error with no target object (I think simple throw statements don't assign a target object, possibly?) this might be better served.

If not, it might be better to remove this assertion.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with just removing that assertion all together. Since we have basically that same assertion on line 38.

@vexx32 vexx32 added Category-Koans Invoking the Great Doubt PR-Awaiting-Author ✏️ Waiting on a response from the user who submitted the PR. labels Jun 8, 2019
Brandon Lundt and others added 8 commits June 8, 2019 20:38
….ps1

Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1

Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1

Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1

Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1

Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1

Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1

Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
Copy link
Owner

@vexx32 vexx32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Thank you for the contribution!! 💖

@vexx32 vexx32 merged commit 8a4e35a into vexx32:master Jun 9, 2019
@vexx32 vexx32 removed the PR-Awaiting-Author ✏️ Waiting on a response from the user who submitted the PR. label Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category-Koans Invoking the Great Doubt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AboutErrorHandling
1 participant