DataException
extends RuntimeException
in package
implements
ExceptionInterface
Uses
DebugTraceableTrait
Interfaces, Classes and Traits
- ExceptionInterface
- Provides a domain-level interface for broad capture of all database-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.
- 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[, Throwable|null $previous = null ]) : mixed
Parameters
- $message : string = ''
- $code : int
- $previous : Throwable|null = null
Return values
mixed —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
Return values
mixed —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
Return values
mixed —forInvalidAllowedFields()
public
static forInvalidAllowedFields(string $model) : mixed
Parameters
- $model : string
Return values
mixed —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