class HandledError

An error that was caught / interpreted by Flarum's error handling stack.

Most importantly, such an error has a "type" (which is used to look up translated error messages and views to render pretty HTML pages) and an associated HTTP status code for used in rendering HTTP error responses.

Methods

static 
unknown(Throwable $error)

No description

__construct(Throwable $error, $type, $statusCode)

No description

withDetails(array $details)

No description

getException()

No description

string
getType()

No description

int
getStatusCode()

No description

bool
shouldBeReported()

No description

array
getDetails()

No description

bool
hasDetails()

No description

Details

static unknown(Throwable $error)

Parameters

Throwable $error

__construct(Throwable $error, $type, $statusCode)

Parameters

Throwable $error
$type
$statusCode

HandledError withDetails(array $details)

Parameters

array $details

Return Value

HandledError

Throwable getException()

Return Value

Throwable

string getType()

Return Value

string

int getStatusCode()

Return Value

int

bool shouldBeReported()

Return Value

bool

array getDetails()

Return Value

array

bool hasDetails()

Return Value

bool