Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12742603
DatabaseException.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
DatabaseException.php
View Options
<?php
/**
* _, __, _, _ __, _ _, _, _
* / \ |_) (_ | | \ | /_\ |\ |
* \ / |_) , ) | |_/ | | | | \|
* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
*
* Database exception class
*
* @package ObsidianWorkspaces
* @subpackage Keruald
* @author Sébastien Santoro aka Dereckson <dereckson@espace-win.org>
* @license http://www.opensource.org/licenses/bsd-license.php BSD
* @filesource
*
*/
/**
* DatabaseException class.
*
* Used to throw exception running queries.
*/
class
DatabaseException
extends
RuntimeException
{
/**
* @var string the SQL query
*/
protected
$query
=
null
;
/**
* Initializes a new instance of the DatabaseException class
*
* @param string|null $query The query executed. Null if the exception occured outside a query.
* @param string $message The message to throw.
* @param int $code The code.
* @param Exception $previous The previous exception used for the exception chaining.
*/
public
function
__construct
(
$query
=
null
,
$message
=
''
,
$code
=
0
,
Exception
$previous
=
null
)
{
$this
->
query
=
$query
;
parent
::
__construct
(
$message
,
$code
,
$previous
);
}
/**
* Gets the the SQL query
*
* @return string|null The SQL query or null if the exception were thrown outside a query context.
*/
public
final
function
getQuery
()
{
return
$this
->
query
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 16, 13:50 (2 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3150217
Default Alt Text
DatabaseException.php (1 KB)
Attached To
Mode
rOBSIDIAN Obsidian Workspaces
Attached
Detach File
Event Timeline
Log In to Comment