PowerShell Error Handling

try { 0/0 }
catch {
  Write-Host "the error: $_" -fore cyan
}
function foo {
  trap {"error found"}
  0/0
  write-host "still here"
}

Related: two common parameters

docs reading