DBException extends Exception
Table of Contents
$sql | SQL Statement | string |
---|---|---|
$opts | Last options | array |
__construct() | Create a new database exception. | mixed |
__toString() | Print the exception and query | string |
getSQL() | Retrieve the sql statement used | string |
getOpts() | Retrieve the options sent to the prepared statement | array|stdClass |
Properties
$sql
SQL Statement
private
string
$sql
= ''
$opts
Last options
private
array
$opts
= []
Methods
__construct()
Create a new database exception.
public
__construct(
[ $message :
string
= '' ]
[, $code :
string
= '0' ]
[, $previous :
Exception
= null ]
[, $sql :
string
= '' ]
[, $opts :
mixed
= [] ]
)
: mixed
Parameters
- $message : string = ''
Error message
- $code : string = '0'
Error code
- $previous : Exception = null
Previous error
- $sql : string = ''
SQL statement that generated the exception
- $opts : mixed = []
Return values
mixed__toString()
Print the exception and query
public
__toString(
)
: string
Return values
string —HTML formatter error text
getSQL()
Retrieve the sql statement used
public
getSQL(
)
: string
Return values
string —sql
getOpts()
Retrieve the options sent to the prepared statement
public
getOpts(
)
: array|stdClass
Return values
array|stdClass —opts