O'Reilly logo

Pro Windows PowerShell by Hristo Deshev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9.3. Summary

The topics of error handling and script debugging are intricately connected, and hopefully, this chapter showed exactly that. We can beef up our error handling logic so that we create clear and self-diagnosing code, which, in turn, will require less debugging in order to make it do what we really want. The opposite connection is also true—we can use purely error-handling related techniques, such as error traps, to log error information that helps us in debugging our code.

Adding good error handling capabilities to code is both an important habit and a valuable skill that anyone working with code can benefit from. Given that, most of the time we spend writing code is spent not in typing or planning but in debugging code that we have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required