powershell-error

star 4

PowerShell error handling: terminating vs non-terminating errors, $ErrorActionPreference levels (Continue/Stop/SilentlyContinue/Ignore/Inquire), -ErrorAction parameter scope, try/catch/finally with typed catches, ErrorRecord anatomy ($_.Exception/$_.CategoryInfo/$_.TargetObject), throw vs Write-Error, trap statement, $LASTEXITCODE for native commands, $PSNativeCommandUseErrorActionPreference (7.3+), $? boolean, exit codes, custom exception classes. Use proactively when the user asks "PowerShell 错误处理 / try-catch / ErrorAction / 退出码 / LASTEXITCODE / terminating error". Also triggers on "throw", "trap", "$Error", "ErrorRecord", "$ErrorActionPreference", "终止错误", "非终止错误".

lazygophers By lazygophers schedule Updated 5/17/2026

Skill instructions (SKILL.md) could not be loaded from local cache or raw GitHub repository.

Install via CLI
npx skills add https://github.com/lazygophers/ccplugin --skill powershell-error
Repository Details
star Stars 4
call_split Forks 2
navigation Branch main
article Path SKILL.md
More from Creator