CodeIgniter v4.5 API

DataException extends RuntimeException
in package
implements ExceptionInterface uses DebugTraceableTrait

Table of Contents

Interfaces

ExceptionInterface
Provides a domain-level interface for broad capture of all database-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.
forEmptyDataset()  : DataException
Used by Model's insert/update methods when there isn't any data to actually work with.
forEmptyInputGiven()  : mixed
forEmptyPrimaryKey()  : DataException
Used by Model's insert/update methods when there is no primary key defined and Model has option `useAutoIncrement` set to false.
forFindColumnHaveMultipleColumns()  : mixed
forInvalidAllowedFields()  : mixed
forInvalidArgument()  : DataException
Thrown when an argument for one of the Model's methods were empty or otherwise invalid, and they could not be to work correctly for that method.
forInvalidMethodTriggered()  : DataException
Used by the Model's trigger() method when the callback cannot be found.
forTableNotFound()  : mixed

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

forEmptyDataset()

Used by Model's insert/update methods when there isn't any data to actually work with.

public static forEmptyDataset(string $mode) : DataException
Parameters
$mode : string
Return values
DataException

forEmptyInputGiven()

public static forEmptyInputGiven(string $argument) : mixed
Parameters
$argument : string

forEmptyPrimaryKey()

Used by Model's insert/update methods when there is no primary key defined and Model has option `useAutoIncrement` set to false.

public static forEmptyPrimaryKey(string $mode) : DataException
Parameters
$mode : string
Return values
DataException

forFindColumnHaveMultipleColumns()

public static forFindColumnHaveMultipleColumns() : mixed

forInvalidAllowedFields()

public static forInvalidAllowedFields(string $model) : mixed
Parameters
$model : string

forInvalidArgument()

Thrown when an argument for one of the Model's methods were empty or otherwise invalid, and they could not be to work correctly for that method.

public static forInvalidArgument(string $argument) : DataException
Parameters
$argument : string
Return values
DataException

forInvalidMethodTriggered()

Used by the Model's trigger() method when the callback cannot be found.

public static forInvalidMethodTriggered(string $method) : DataException
Parameters
$method : string
Return values
DataException

forTableNotFound()

public static forTableNotFound(string $table) : mixed
Parameters
$table : string

        
On this page

Search results