> */ private $response_headers; /** * Constructor. * * @param string $message The error message. * @param int $code The error status code. * @param string $error_identifier The error code identifier, used to identify a type of error. * @param Throwable|null $previous The previously thrown exception. * @param array> $response_headers The response headers associated with the error. */ public function __construct( $message = '', $code = 0, $error_identifier = '', ?Throwable $previous = null, array $response_headers = [] ) { parent::__construct( $message, $code, $previous ); $this->error_identifier = (string) $error_identifier; $this->response_headers = $response_headers; } /** * Returns the error identifier. * * @return string The error identifier. */ public function get_error_identifier(): string { return $this->error_identifier; } /** * Returns the response headers associated with the error, keyed by lower-cased header name. * * @return array> The response headers. */ public function get_response_headers(): array { return $this->response_headers; } }