DB
[ class tree: DB ] [ index: DB ] [ all elements ]

File: errors.inc

Source Location: /DB-1.7.0/tests/errors.inc

Classes:

Page Details:

Tests the drivers' error mapping

Executed by driver/10errormap.phpt

PHP versions 4 and 5

LICENSE: This source file is subject to version 3.0 of the PHP license that is available through the world-wide-web at the following URI: http://www.php.net/license/3_0.txt. If you did not receive a copy of the PHP License and are unable to obtain it through the web, please send a note to license@php.net so we can mail you a copy immediately.


check_error [line 39]

void check_error( object $e, int $expected_db_code, [boolean $should_be_error = true])

Determine if the error from the driver matches the error we expect

If things are as we expect, print out "matches expected outcome"

If things go wrong, print "UNEXPECTED OUTCOME" and display the error's information.



Parameters

object   $e   the DB_Error object from the query
int   $expected_db_code   the DB_ERROR* constant to expect
boolean   $should_be_error   does the DBMS consider this an error?
[ Top ]



pe [line 70]

void pe( object $o)

Local error callback handler
  • See: PEAR::setErrorHandling()


Parameters

object   $o   PEAR error object automatically passed to this method
[ Top ]



Documentation generated on Mon, 28 Feb 2005 23:40:50 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.