Welcome Forums General PowerShell Q&A 2 kinds of terminating errors

Viewing 2 reply threads
  • Author
    Posts
    • #172573
      js
      Participant
      Topics: 28
      Replies: 752
      Points: 2,104
      Helping Hand
      Rank: Community Hero

      There’s 2 kinds of terminating errors now, script and statement (“nonterminating terminating errors”)? Ugh, powershell is so weird and hard to know. https://github.com/MicrosoftDocs/PowerShell-Docs/issues/1583

    • #172588
      Participant
      Topics: 2
      Replies: 512
      Points: 1,310
      Helping Hand
      Rank: Community Hero

      That’s a “sort of” from me.

      But yeah, error handling is currently a bit messy. I’d love to see it cleaned up and sorted out for PS7, but it doesn’t seem like that’s super likely at this point in time.

      I’ve found that at least when working with my own code, if I’m consistent in how I throw errors I generally have a better time dealing with it and get the results I expect every time.

    • #172591
      Participant
      Topics: 0
      Replies: 115
      Points: 433
      Helping Hand
      Rank: Contributor

      I agree with Joel on this.

Viewing 2 reply threads
  • The topic ‘2 kinds of terminating errors’ is closed to new replies.