Terminating and non-terminating errors
PowerShell distinguishes between
terminating and
non-terminating errors.
A
terminating error immediately terminates the current
pipeline.
Non-terminating errors are typically reported, but the cmdlet (and hence the pipeline) continues processing its input
objects.
A cmdlet reports a non-terminating error by calling
WriteError()
, which then sends an
error record to the
error stream.
The
preference variable $errorActionPreference
controls how PowerShell reacts to a non-terminating error.