cvs: pear /MDB2/MDB2/Driver ibase.php /MDB2/MDB2/Driver/Datatype Common.php /MDB2/MDB2/Driver/Reverse sqlite.php

From: Date: Fri, 07 Apr 2006 15:24:59 +0000
Subject: cvs: pear /MDB2/MDB2/Driver ibase.php /MDB2/MDB2/Driver/Datatype Common.php /MDB2/MDB2/Driver/Reverse sqlite.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-39470@lists.php.net to get a copy of this message
lsmith Fri Apr 7 15:24:59 2006 UTC Modified files: /pear/MDB2/MDB2/Driver ibase.php /pear/MDB2/MDB2/Driver/Datatype Common.php /pear/MDB2/MDB2/Driver/Reverse sqlite.php Log: - set error code in raiseError() call http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/ibase.php?r1=1.147&r2=1.148&diff_format=u Index: pear/MDB2/MDB2/Driver/ibase.php diff -u pear/MDB2/MDB2/Driver/ibase.php:1.147 pear/MDB2/MDB2/Driver/ibase.php:1.148 --- pear/MDB2/MDB2/Driver/ibase.php:1.147 Sat Mar 25 10:39:02 2006 +++ pear/MDB2/MDB2/Driver/ibase.php Fri Apr 7 15:24:59 2006 @@ -43,7 +43,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.147 2006/03/25 10:39:02 lsmith Exp $ +// $Id: ibase.php,v 1.148 2006/04/07 15:24:59 lsmith Exp $ /** * MDB2 FireBird/InterBase driver @@ -945,7 +945,8 @@ } if (!is_resource($this->result)) { - return $this->db->raiseError('numCols(): not a valid ibase resource'); + return $this->db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'numCols(): not a valid ibase resource'); } $cols = @ibase_num_fields($this->result); if (is_null($cols)) { http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/Datatype/Common.php?r1=1.57&r2=1.58&diff_format=u Index: pear/MDB2/MDB2/Driver/Datatype/Common.php diff -u pear/MDB2/MDB2/Driver/Datatype/Common.php:1.57 pear/MDB2/MDB2/Driver/Datatype/Common.php:1.58 --- pear/MDB2/MDB2/Driver/Datatype/Common.php:1.57 Thu Mar 23 13:29:16 2006 +++ pear/MDB2/MDB2/Driver/Datatype/Common.php Fri Apr 7 15:24:59 2006 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.57 2006/03/23 13:29:16 lsmith Exp $ +// $Id: Common.php,v 1.58 2006/04/07 15:24:59 lsmith Exp $ require_once 'MDB2/LOB.php'; @@ -257,7 +257,8 @@ return $db; } - return $db->raiseError('type not defined: '.$type); + return $db->raiseError(MDB2_ERROR_NOT_FOUND, null, null, + 'type not defined: '.$type); } return $this->{"_get{$type}Declaration"}($name, $field); } http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/Reverse/sqlite.php?r1=1.43&r2=1.44&diff_format=u Index: pear/MDB2/MDB2/Driver/Reverse/sqlite.php diff -u pear/MDB2/MDB2/Driver/Reverse/sqlite.php:1.43 pear/MDB2/MDB2/Driver/Reverse/sqlite.php:1.44 --- pear/MDB2/MDB2/Driver/Reverse/sqlite.php:1.43 Thu Mar 23 12:30:34 2006 +++ pear/MDB2/MDB2/Driver/Reverse/sqlite.php Fri Apr 7 15:24:59 2006 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.43 2006/03/23 12:30:34 lsmith Exp $ +// $Id: sqlite.php,v 1.44 2006/04/07 15:24:59 lsmith Exp $ // require_once 'MDB2/Driver/Reverse/Common.php'; @@ -71,12 +71,14 @@ $columns = array(); $count = count($column_sql); if ($count == 0) { - return $db->raiseError('unexpected empty table column definition list'); + return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'unexpected empty table column definition list'); } $regexp = '/^([^ ]+) (CHAR|VARCHAR|VARCHAR2|TEXT|BOOLEAN|SMALLINT|INT|INTEGER|DECIMAL|BIGINT|DOUBLE|FLOAT|DATETIME|DATE|TIME|LONGTEXT|LONGBLOB)( ?\(([1-9][0-9]*)(:([1-9][0-9]*))?\))?( UNSIGNED)?( PRIMARY KEY)?( DEFAULT (\'[^\']*\'|[^ ]+))?( NOT NULL)?$/i'; for ($i=0, $j=0; $i<$count; ++$i) { if (!preg_match($regexp, trim($column_sql[$i]), $matches)) { - return $db->raiseError('unexpected table column SQL definition: "'.$column_sql[$i].'"'); + return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'unexpected table column SQL definition: "'.$column_sql[$i].'"'); } $columns[$j]['name'] = $matches[1]; $columns[$j]['type'] = strtolower($matches[2]);

« previous php.pear.cvs (#39470) next »