CodeIgniter v4.7 API

CLIException extends RuntimeException
in package
uses DebugTraceableTrait

Exception thrown if an error which can only be found on runtime occurs.

Table of Contents

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.
forInputEnded()  : static
Thrown when a prompt must ask again but the input has ended.
forInvalidColor()  : CLIException
Thrown when `$color` specified for `$type` is not within the allowed list of colors.

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

forInputEnded()

Thrown when a prompt must ask again but the input has ended.

public static forInputEnded() : static
Return values
static

forInvalidColor()

Thrown when `$color` specified for `$type` is not within the allowed list of colors.

public static forInvalidColor(string $type, string $color) : CLIException
Parameters
$type : string
$color : string
Return values
CLIException
On this page

Search results