public class DatabaseException extends Exception

class.mysql.php #14

The DatabaseException class extends a normal Exception to add in debugging information when a SQL query fails such as the internal database error code and message in additional to the usual Exception information. It allows a DatabaseException to contain a human readable error, as well more technical information for debugging.


void __construct(mixed $message, mixed $error)

Constructor takes a message and an associative array to set to $_error. The message is passed to the default Exception constructor

integer getDatabaseErrorCode()

Accessor function for the Database error code for this type of error

string getDatabaseErrorMessage()

Accessor function for the Database message from this Exception

string getQuery()

Accessor function for the original query that caused this Exception

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details