TCnProcess.StandardError Property

Gets a stream used to read the error output of the application.

Namespace: CNClrLib.Component.Process
public
 property StandardError: _StreamReader read GetStandardError;

Property Value

Type: _StreamReader

A StreamReader that can be used to read the standard error stream of the application.

When a Process writes text to its standard error stream, that text is normally displayed on the console. By redirecting the StandardError stream, you can manipulate or suppress the error output of a process. For example, you can filter the text, format it differently, or write the output to both the console and a designated log file.

Note

To use StandardError, you must set TClrProcessStartInfo.UseShellExecute to false, and you must set TClrProcessStartInfo.RedirectStandardError to true. Otherwise, reading from the StandardError stream throws an exception.