Documentation

HttpException extends Exception
in package
implements HttpExceptionInterface

A generic HTTP error.

These are exceptions that are arguably not exceptional. They should generally be restricted to controllers and related helpers. Models/providers/factories/etc should not be emitting these.

Table of Contents

Interfaces

HttpExceptionInterface
These are errors that can inform the status code.

Properties

$status  : int

Methods

__construct()  : mixed
Create a new HTTP error.
getStatusCode()  : int
The HTTP status code, as recommended by the emitter.

Properties

Methods

__construct()

Create a new HTTP error.

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

null implies the 'default' value

$message : string = ''
$previous : Throwable|null = null

getStatusCode()

The HTTP status code, as recommended by the emitter.

public getStatusCode() : int
Tags
inheritdoc
Return values
int
On this page

Search results