Skip to content

Set-ModuleFunctions powershell invoke error handling#98

Open
Dejulia489 wants to merge 1 commit intoRamblingCookieMonster:nextversionfrom
Dejulia489:nextversion
Open

Set-ModuleFunctions powershell invoke error handling#98
Dejulia489 wants to merge 1 commit intoRamblingCookieMonster:nextversionfrom
Dejulia489:nextversion

Conversation

@Dejulia489
Copy link

Resolved #97

@Dejulia489
Copy link
Author

Before:
image

After:
image

@RamblingCookieMonster
Copy link
Owner

Hiyo! Thanks, and sorry for the... year of waiting? ouch!

Some quick questions:

  • Could there be scenarios where both HadErrors is $false, and $Module is not defined? Would it be worth adding the -not $Module bit as an else if?
  • Are there scenarios where HadErrors is $true, but the actual error stream is not indicative of an error state (e.g. asinine programs that write output to error stream)? I suspect this could happen. I wonder if a -IgnoreHadErrors parameter, with your logic changing to $PowerShell.HadErrors -and -not $IgnoreHadErrors or something along those lines would be worth it?

Cheers! cc @jonathanmedd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants