CodeIgniter v4.5 API

FormatException extends RuntimeException
in package
implements ExceptionInterface uses DebugTraceableTrait

FormatException

Table of Contents

Interfaces

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

Methods

__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()  : static
Thrown when the instantiated class does not exist.
forInvalidJSON()  : static
Thrown in JSONFormatter when the json_encode produces an error code other than JSON_ERROR_NONE and JSON_ERROR_RECURSION.
forInvalidMime()  : static
Thrown when the supplied MIME type has no defined Formatter class.
forMissingExtension()  : static
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 = 0 ][, Throwable|null $previous = null ]) : mixed
Parameters
$message : string = ''
$code : int = 0
$previous : Throwable|null = null

forInvalidFormatter()

Thrown when the instantiated class does not exist.

public static forInvalidFormatter(string $class) : static
Parameters
$class : string
Return values
static

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 ]) : static
Parameters
$error : string = null

The error message

Return values
static

forInvalidMime()

Thrown when the supplied MIME type has no defined Formatter class.

public static forInvalidMime(string $mime) : static
Parameters
$mime : string
Return values
static

forMissingExtension()

Thrown on XMLFormatter when the `simplexml` extension is not installed.

public static forMissingExtension() : static
Tags
codeCoverageIgnore
Return values
static

        
On this page

Search results