# Error handling clarification

**URL:** <https://forums.powershell.org/t/error-handling-clarification/19233>\
**Category:** PowerShell Help\
**Created:** [May 3, 2022, 2:15pm UTC](https://forums.powershell.org/t/error-handling-clarification/19233 "2022-05-03T14:15:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joseph-casale](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@joseph-casale](https://forums.powershell.org/u/joseph-casale)\
**Post date:** [May 3, 2022, 2:15pm UTC](https://forums.powershell.org/t/error-handling-clarification/19233/1 "2022-05-03T14:15:49Z")

</div>

The [Error Handling](https://github.com/MicrosoftDocs/PowerShell-Docs/issues/1583) Github issue makes a distinction with **_Statement_ -terminating errors** between **_Non-terminating_ errors** and **_Terminating_ errors**.

How is a **_Non-terminating_ error** any different from a **_Statement_ -terminating error**?

As far as I can tell, real PowerShell errors (versus those generated by executables etc) fall into two categories, statement terminating or script terminating?

What is an example of a non-terminating error that processes the current item in the pipeline?

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [May 3, 2022, 2:24pm UTC](https://forums.powershell.org/t/error-handling-clarification/19233/2 "2022-05-03T14:24:02Z")

</div>

Get-ChildItem is a common one. Plenty of access denied but it keeps trucking by default

---

<div class="post-metadata">

**Author:** ![joseph-casale](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@joseph-casale](https://forums.powershell.org/u/joseph-casale)\
**Post date:** [May 3, 2022, 3:57pm UTC](https://forums.powershell.org/t/error-handling-clarification/19233/3 "2022-05-03T15:57:40Z")

</div>

Right, so that is a statement terminating error, the pipeline continues but the object in the current context was aborted.

I am trying to understand what was meant by a non-terminating error?

I think that was maybe a semantic error in the Github issue? Either an error terminates the statement or the script, right?

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [May 3, 2022, 6:35pm UTC](https://forums.powershell.org/t/error-handling-clarification/19233/4 "2022-05-03T18:35:25Z")

</div>

The most in depth understanding I can offer you comes from Michael Klement on Github/Stackoverflow. Here is a very detailed post

[https://github.com/MicrosoftDocs/PowerShell-Docs/issues/1583](https://github.com/MicrosoftDocs/PowerShell-Docs/issues/1583)

Here are a few pages worth looking over

[https://github.com/PowerShell/PowerShell/issues/6098](https://github.com/PowerShell/PowerShell/issues/6098)  
[https://github.com/PowerShell/PowerShell/issues/14819](https://github.com/PowerShell/PowerShell/issues/14819)

> **[about Try Catch Finally - PowerShell](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_try_catch_finally?view=powershell-7.2)**
>
> Describes how to use the \`try\`, \`catch\`, and \`finally\` blocks to handle terminating errors.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:18pm UTC](https://forums.powershell.org/t/error-handling-clarification/19233/5 "2024-05-16T20:18:00Z")

</div>


