-
Notifications
You must be signed in to change notification settings - Fork 21
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
Yellow test if Empty Try/Catch #73
Comments
Hmm, |
@2xmax I didn't get how Get-Service invalidservice relates to this issue? I, believe, in you example the exception were handled internally by underlying code of Get-Service. And what you seen in the console output is just the result of Write-Host. I think nothing can be done here. But again, it is not about the issue we are trying to discuss :) |
I think the main issue is that we have removed this ELSE https://github.com/konstantinvlasenko/PowerSlim/pull/71/files#diff-3a586a9b299992da7ba63a2496a138f2L312 for non-terminating error. |
The main problem with previous version was concerned with skipping such statements: |
(if I understood you right, powerslim will not show the error if we just return it as result of script execution) |
It will if you will use |check| or |show| |
Maybe we should introduce a global setting?! $NonTerminatingIsException = $true In this case we'll use your new approach. What do you think? |
I remember several times I received such test reports: |
BTW, not only me used this |PS| scenario:) |
So what we are going to do? |
I think the $NonTerminatingIsException = $true should be enough for your case. You can always set it to TRUE. But by default it should be FALSE. |
NonTerminatingIsException flag is ok for me. I agree with you, It can be painful if there are already a lot if rmdir and remove-items in suite. |
remove-items is just one example :) It can be Remove-SPWeb or DELETE method for any REST API for non-existing object. Basically we are talking about any cleanup operation. I don't want to check the existence of something before removing it. |
ok, will do |
https://github.com/konstantinvlasenko/PowerSlim/blob/master/FitNesseRoot/PowerSlim/OriginalMode/SuiteCommon/TestCatchException/content.txt
The text was updated successfully, but these errors were encountered: