void testManualException(
)
|
|
Test of manually sending messages and error codes.
Method first test sending an invented error code and message to to Mysql_Excpetion::generateError, and checks that an instance of Mysql_Exception is returned. Method then tests sending an error code of 1062 and checks that an instance of Mysql_Dup_Index_Exception is returned.
API Tags:
void testMysqlException(
)
|
|
Test of retrieving messages and error codes from MySQL.
Method first tests sending a query which will generate an error code of 1146, and checks that an instance of Mysql_Exception is returned. Method then tests sending a query which will generate an error code of 1062 and checks that an instance of Mysql_Dup_Index_Exception is returned.
API Tags:
void throwMysqlException(
string
$message, int
$code
)
|
|
Throws an exception passing the parameters onto the exception class.
Parameters:
|
string |
$message: |
|
|
int |
$code: |
|
API Tags:
Information Tags: