Documentation

FormatException extends RuntimeException
in package
implements ExceptionInterface Uses DebugTraceableTrait

FormatException

Interfaces, Classes and Traits

ExceptionInterface
Provides a domain-level interface for broad capture of all framework-related exceptions.

Table of Contents

__construct()  : mixed
Tweaks the exception's constructor to assign the file/line to where it is actually raised rather than were it is instantiated.
forInvalidFormatter()  : FormatException
Thrown when the instantiated class does not exist.
forInvalidJSON()  : FormatException
Thrown in JSONFormatter when the json_encode produces an error code other than JSON_ERROR_NONE and JSON_ERROR_RECURSION.
forInvalidMime()  : FormatException
Thrown when the supplied MIME type has no defined Formatter class.
forMissingExtension()  : FormatException
Thrown on XMLFormatter when the `simplexml` extension is not installed.

Methods

__construct()

Tweaks the exception's constructor to assign the file/line to where it is actually raised rather than were it is instantiated.

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

forInvalidJSON()

Thrown in JSONFormatter when the json_encode produces an error code other than JSON_ERROR_NONE and JSON_ERROR_RECURSION.

public static forInvalidJSON([string $error = null ]) : FormatException
Parameters
$error : string = null
Return values
FormatException

Search results