Tag: error-handling
All the articles with the tag "error-handling".
-
Execution of external commands (native applications) in PowerShell done right - Part 3
Fixing Invoke-NativeApplication to handle Windows exit codes beyond 0-255 using an IgnoreExitCode switch.
-
Execution of external commands (native applications) in PowerShell done right - Part 2
Improved Invoke-NativeApplication with an IsError property on each output line and a prompt function edge-case fix.
-
Execution of external commands in PowerShell done right
A PowerShell exec helper that correctly captures stdout and stderr from native commands and checks exit codes.
-
Write-Error vs error tracing
PowerShell Write-Error always reports line 1 instead of the actual error location, with no clean workaround found.
-
PowerShell $ErrorActionPreference = "Stop" vs error tracing
Why ErrorActionPreference Stop hides the true error line number and how trap { throw $Error[0] } fixes it.
-
PowerShell 3 bug with stack trace
PowerShell 3 shows incorrect line numbers in stack traces when CmdletBinding and ErrorActionPreference are combined; trap workaround included.