The StreamError class

Introduction

A StreamError object describes a single error reported by a stream operation. Instances are created by PHP and are returned by stream_last_errors and StreamException::getErrors, and passed to the error_handler stream context option.

Class synopsis

final readonly StreamError
/* Properties */
public StreamErrorCode $code;
public string $message;
public string $wrapperName;
public int $severity;
public bool $terminating;

Properties

code
The StreamErrorCode case identifying the kind of error.
message
The error message. This is the text of the diagnostic that is emitted with StreamErrorMode::Error, without the function name prefix.
wrapperName
The name of the stream wrapper that reported the error, for example plainfile for local files.
severity
The level the error is reported with in StreamErrorMode::Error mode, as one of the E_* constants, such as E_WARNING or E_NOTICE.
terminating
true if the error ended the operation and throws a StreamException in StreamErrorMode::Exception mode, false otherwise.

See Also