Error Handling

Errors are used to communicate unexpected conditions or exceptional circumstances. Errors often contain useful information that can be used to diagnose a condition.

PowerShell has two different types of errors, terminating and non-terminating, and several different ways to raise and handle them.

During the course of this chapter, self-contained blocks of code are described as scripts. The terms function, ScriptBlock, and script can be considered interchangeable in the context of error handling.

The following topics are covered in this chapter:

  • Error types
  • Error actions
  • Raising errors
  • Catching errors
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.98.13