Oihana PHP Exceptions

Error418 extends HttpException

The HTTP 418 I'm a teapot status code indicates that the server refuses to brew coffee because it is, permanently, a teapot. This is a reference to the Hyper Text Coffee Pot Control Protocol (an April Fools' joke from 1998) and is not expected to be implemented by actual HTTP servers.

Tags
author

Marc Alcaraz (ekameleon)

since
1.0.0
see
https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/418

Table of Contents

Constants

DEFAULT_CODE  : int = 418
The default HTTP status code of the exception.
DEFAULT_MESSAGE  : string = 'I\'m a teapot (418)'
The default message of the exception.

Methods

__construct()  : mixed
Creates a new HttpException instance.

Constants

DEFAULT_CODE

The default HTTP status code of the exception.

public int DEFAULT_CODE = 418

DEFAULT_MESSAGE

The default message of the exception.

public string DEFAULT_MESSAGE = 'I\'m a teapot (418)'

Methods

__construct()

Creates a new HttpException instance.

public __construct([string|null $message = null ][, int|null $code = null ][, Throwable|null $previous = null ]) : mixed
Parameters
$message : string|null = null

The error message, or null to use the class default.

$code : int|null = null

The HTTP status code, or null to use the class default.

$previous : Throwable|null = null

The previous throwable used for exception chaining.

On this page

Search results