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

Modulus Errors #92

Closed
Tuxhedoh opened this issue Nov 15, 2018 · 8 comments
Closed

Modulus Errors #92

Tuxhedoh opened this issue Nov 15, 2018 · 8 comments
Labels
Category-Koans Invoking the Great Doubt Issue-Discussion Let's talk about it!

Comments

@Tuxhedoh
Copy link

} | Should -Throw -ExpectedMessage __

I understand what you're going for here, but I'm not convinced that this is a good excersize. I hate pointing out something without offering a fix.

@vexx32 vexx32 added Category-Koans Invoking the Great Doubt Issue-Discussion Let's talk about it! labels Nov 15, 2018
@vexx32
Copy link
Owner

vexx32 commented Nov 15, 2018

Is there a more appropriate way to illustrate the limitations of operators, do you think? 🙂

@Tuxhedoh
Copy link
Author

Not really.... I know my experience with POSH. I'm not sure someone with less experience would be able to pass this test. I had to jump into the terminal and run the line and look at $error[0]. Not sure how else to see this. Maybe I am the target audience. If that's the case... than maybe it's perfectly fine.

@vexx32
Copy link
Owner

vexx32 commented Nov 15, 2018

Does running the Measure-Karma command when at this test point not show the expected error message?

@Tuxhedoh
Copy link
Author

Tuxhedoh commented Nov 15, 2018 via email

@vexx32
Copy link
Owner

vexx32 commented Nov 15, 2018

In this case, I think it is. 😄

It's more intended to simply illustrate that a) an error will be thrown, and b) what that error looks like, so folks can learn a little of what to look for when their code breaks in certain ways. 😁

@Tuxhedoh
Copy link
Author

Of course if they just run the code, they don't even see that error message by default.
image

I answered this with System.Management.Automation.RuntimeException, because that's the actual exceptiontype (I think). Where it looks like you're expecting the Exception.Message. I don't know. Just offering feedback.

@vexx32
Copy link
Owner

vexx32 commented Nov 16, 2018

I think I've already got that changed in the latest commit to use -ExpectedMessage, yeah. Actually, that's doubly a bug because there is a type called __ but not one ___ so that message would be much clearer if I had typed the dummy type name properly 😂

@vexx32
Copy link
Owner

vexx32 commented Jan 29, 2019

I believe this has been addressed in the recent release(s). 😄

@vexx32 vexx32 closed this as completed Jan 29, 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 Issue-Discussion Let's talk about it!
Projects
None yet
Development

No branches or pull requests

2 participants