function DB_Error::DB_Error in Flickr API 5
DB_Error constructor
Parameters
mixed $code DB error code, or string with error message:
int $mode what "error mode" to operate in:
int $level what error level to use for $mode &: PEAR_ERROR_TRIGGER
mixed $debuginfo additional debug info, such as the last query:
See also
File
- phpFlickr/
PEAR/ DB.php, line 882
Class
- DB_Error
- DB_Error implements a class for reporting portable database error messages
Code
function DB_Error($code = DB_ERROR, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE, $debuginfo = null) {
if (is_int($code)) {
$this
->PEAR_Error('DB Error: ' . DB::errorMessage($code), $code, $mode, $level, $debuginfo);
}
else {
$this
->PEAR_Error("DB Error: {$code}", DB_ERROR, $mode, $level, $debuginfo);
}
}