This chapter explored the different ways to raise and handle errors in PowerShell. Then, we looked at the difference between terminating and non-terminating errors.
We discussed using try-catch-finally, introduced with PowerShell 2, as the preferred means of handling terminating errors.
Then we demonstrated the use of trap, the type of error handling available with PowerShell 1, which we can add to our error-handling toolset.