This chapter has explored the different ways of raising and handling errors in PowerShell.
The difference between terminating and non-terminating errors was explored.
Using try-catch-finally
, introduced with PowerShell 2, was explored as the preferred means of handling terminating errors.
trap
, the type of error handling available with PowerShell 1, was demonstrated to add to the error handling toolset.