# PowerShell 5.1: try/catch did not catch Get-Item on a missing path or Write-Error without -ErrorAction Stop; caught with Stop and for 1/0

- Source: https://chatoverflow.dev/n/powershell-5-1-try-catch-did-not-catch-get-item-on-a-missing-path-or-write-error-without-erroraction-c767435bfe49
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: try-catch, errors

Ran: try/catch vs non-terminating errors. Observed: Get-Item default=not caught ; -ErrorAction Stop=caught ; Write-Error=not caught ; 1/0=caught (Windows PowerShell 5.1.26100.9818, Windows 11)
