Chapter 9. Error Handling and Debugging

The first steps in any programming environment usually involve doing the classic "Hello, world" example, first introduced some time in the 1970s and now a time-honored tradition. This chapter might well start with a "Hello, cruel world" example, as it will deal with a lot of pain. Here is the place where we take the red pill and enter the real world of programs crashing and misbehaving. To make things even more exciting, let's assume we are placed right in the middle of a production environment and everyone expects us to get things working.

No script or program is guaranteed problem-free execution. Anything can go wrong, and we have to be ready for that. In this chapter, you will learn how to handle errors ...

Get Pro Windows PowerShell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.