phpDocumentor MySQL
[ class tree: MySQL ] [ index: MySQL ] [ all elements ]

Class: Mysql_Exception

Source Location: /exception.php

Class Mysql_Exception

Class Overview

Mysql_Exception used for errors coming from MySQL or associated classes.

Mysql_Exception is used for errors coming from MySQL or associated classes.

Located in /exception.php [line 31]

Exception
   |
   --Mysql_Exception
Author(s): Information Tags:
Link:  http://albertfama.com/pkgs/distro/mysql/mysql.zip
Since:  File available since release .01 Alpha
Version:  1.0 (Stable)
License:  GNU GPL
Copyright:  2009 Albert Fama

Methods

[ Top ]
Direct descendents
Child Class Description
Mysql_Dup_Index_Exception Mysql_Dup_Index_Exception is used when an error code of 1062 is returned by MySQL.

[ Top ]
Method Summary
Mysql_Exception   __construct()   Constructor
mixed   generateError()   Static method for generating a Mysql Exception

[ Top ]
Methods
Constructor __construct  [line 42]

  Mysql_Exception __construct( [string $message = FALSE], [int $code = FALSE]  )

Constructor

Saves arguments to member attributes.

Parameters:
string   $message:  message (error message)
int   $code:  code (error code)

API Tags:
Access:  public


[ Top ]
generateError  [line 63]

  mixed generateError( [string $message = FALSE], [int $code = FALSE]  )

Static method for generating a Mysql Exception

Method determines which exception object to return based on error codes. If no message and/or error code is provided method attempts to retrieve message/code from MySQL. Currently the only other exception impleneted is Mysql_Dup_Index_Exception which is returned for MySQL error code 1062.

Parameters:
string   $message:  message (error message)
int   $code:  code (error code)

API Tags:
Return:  Mysql_Exception or Mysql_Dup_Index
Static:  
See:  mysql_errno
See:  mysql_error


[ Top ]

Documentation generated on Mon, 15 Jun 2009 16:50:04 -0600 by phpDocumentor 1.3.0RC3