]> granicus.if.org Git - php/commitdiff
PEAR DB: added DB_ERROR_VALUE_COUNT_ON_ROW
authorStig Bakken <ssb@php.net>
Sun, 15 Oct 2000 09:02:54 +0000 (09:02 +0000)
committerStig Bakken <ssb@php.net>
Sun, 15 Oct 2000 09:02:54 +0000 (09:02 +0000)
pear/DB.php
pear/PEAR.php.in

index 3a409e87dcf5c08a05504b731cace17e5f844fe4..81eb123c6ef0fe12fc9f557144ec74f81f1db74a 100644 (file)
@@ -31,28 +31,29 @@ require_once "PEAR.php";
  * If you add an error code here, make sure you also add a textual
  * version of it in DB::errorMessage().
  */
-define("DB_OK",                         0);
-define("DB_ERROR",                     -1);
-define("DB_ERROR_SYNTAX",              -2);
-define("DB_ERROR_CONSTRAINT",          -3);
-define("DB_ERROR_NOT_FOUND",           -4);
-define("DB_ERROR_ALREADY_EXISTS",      -5);
-define("DB_ERROR_UNSUPPORTED",         -6);
-define("DB_ERROR_MISMATCH",            -7);
-define("DB_ERROR_INVALID",             -8);
-define("DB_ERROR_NOT_CAPABLE",         -9);
-define("DB_ERROR_TRUNCATED",       -10);
-define("DB_ERROR_INVALID_NUMBER",  -11);
-define("DB_ERROR_INVALID_DATE",    -12);
-define("DB_ERROR_DIVZERO",         -13);
-define("DB_ERROR_NODBSELECTED",    -14);
-define("DB_ERROR_CANNOT_CREATE",   -15);
-define("DB_ERROR_CANNOT_DELETE",   -16);
-define("DB_ERROR_CANNOT_DROP",     -17);
-define("DB_ERROR_NOSUCHTABLE",     -18);
-define("DB_ERROR_NOSUCHFIELD",     -19);
-define("DB_ERROR_NEED_MORE_DATA",  -20);
-define("DB_ERROR_NOT_LOCKED",      -21);
+define("DB_OK",                        0);
+define("DB_ERROR",                     -1);
+define("DB_ERROR_SYNTAX",              -2);
+define("DB_ERROR_CONSTRAINT",          -3);
+define("DB_ERROR_NOT_FOUND",           -4);
+define("DB_ERROR_ALREADY_EXISTS",      -5);
+define("DB_ERROR_UNSUPPORTED",         -6);
+define("DB_ERROR_MISMATCH",            -7);
+define("DB_ERROR_INVALID",             -8);
+define("DB_ERROR_NOT_CAPABLE",         -9);
+define("DB_ERROR_TRUNCATED",          -10);
+define("DB_ERROR_INVALID_NUMBER",     -11);
+define("DB_ERROR_INVALID_DATE",       -12);
+define("DB_ERROR_DIVZERO",            -13);
+define("DB_ERROR_NODBSELECTED",       -14);
+define("DB_ERROR_CANNOT_CREATE",      -15);
+define("DB_ERROR_CANNOT_DELETE",      -16);
+define("DB_ERROR_CANNOT_DROP",        -17);
+define("DB_ERROR_NOSUCHTABLE",        -18);
+define("DB_ERROR_NOSUCHFIELD",        -19);
+define("DB_ERROR_NEED_MORE_DATA",     -20);
+define("DB_ERROR_NOT_LOCKED",         -21);
+define("DB_ERROR_VALUE_COUNT_ON_ROW", -22);
 
 
 /*
@@ -243,28 +244,29 @@ class DB {
        function errorMessage($value) {
                if (!isset($errorMessages)) {
                        $errorMessages = array(
-                               DB_ERROR                => "unknown error",
-                               DB_ERROR_ALREADY_EXISTS => "already exists",
-                               DB_ERROR_CANNOT_CREATE  => "can not create",
-                               DB_ERROR_CANNOT_DELETE  => "can not delete",
-                               DB_ERROR_CANNOT_DROP    => "can not drop",
-                               DB_ERROR_CONSTRAINT     => "constraint violation",
-                               DB_ERROR_DIVZERO        => "division by zero",
-                               DB_ERROR_INVALID        => "invalid",
-                               DB_ERROR_INVALID_DATE   => "invalid date or time",
-                               DB_ERROR_INVALID_NUMBER => "invalid number",
-                               DB_ERROR_MISMATCH       => "mismatch",
-                               DB_ERROR_NODBSELECTED   => "no database selected",
-                               DB_ERROR_NOSUCHFIELD    => "no such field",
-                               DB_ERROR_NOSUCHTABLE    => "no such table",
-                               DB_ERROR_NOT_CAPABLE    => "DB backend not capable",
-                               DB_ERROR_NOT_FOUND      => "not found",
-                               DB_ERROR_NOT_LOCKED     => "not locked",
-                               DB_ERROR_SYNTAX         => "syntax error",
-                               DB_ERROR_UNSUPPORTED    => "not supported",
-                               DB_OK                   => "no error",
-                               DB_WARNING              => "unknown warning",
-                               DB_WARNING_READ_ONLY    => "read only"
+                               DB_ERROR                    => "unknown error",
+                               DB_ERROR_ALREADY_EXISTS     => "already exists",
+                               DB_ERROR_CANNOT_CREATE      => "can not create",
+                               DB_ERROR_CANNOT_DELETE      => "can not delete",
+                               DB_ERROR_CANNOT_DROP        => "can not drop",
+                               DB_ERROR_CONSTRAINT         => "constraint violation",
+                               DB_ERROR_DIVZERO            => "division by zero",
+                               DB_ERROR_INVALID            => "invalid",
+                               DB_ERROR_INVALID_DATE       => "invalid date or time",
+                               DB_ERROR_INVALID_NUMBER     => "invalid number",
+                               DB_ERROR_MISMATCH           => "mismatch",
+                               DB_ERROR_NODBSELECTED       => "no database selected",
+                               DB_ERROR_NOSUCHFIELD        => "no such field",
+                               DB_ERROR_NOSUCHTABLE        => "no such table",
+                               DB_ERROR_NOT_CAPABLE        => "DB backend not capable",
+                               DB_ERROR_NOT_FOUND          => "not found",
+                               DB_ERROR_NOT_LOCKED         => "not locked",
+                               DB_ERROR_SYNTAX             => "syntax error",
+                               DB_ERROR_UNSUPPORTED        => "not supported",
+                               DB_ERROR_VALUE_COUNT_ON_ROW => "value count on row",
+                               DB_OK                       => "no error",
+                               DB_WARNING                  => "unknown warning",
+                               DB_WARNING_READ_ONLY        => "read only"
                        );
                }
                if (DB::isError($value)) {
index 3a6770cafe433a1248e7a49873cae0df8ba632c3..c220a5a06089189b1eb5ee8c9ae7d2a4ca7962c6 100644 (file)
@@ -173,6 +173,8 @@ class PEAR_Error
         * PEAR_ERROR_CALLBACK, the callback function or object/method
         * tuple.
         *
+        * @access public
+        *
         */
        function PEAR_Error($message = 'unknown error',
                                                $code = 0,
@@ -223,6 +225,12 @@ class PEAR_Error
     // }}}
     // {{{ getMode()
 
+       /**
+        * Get the error mode from an error object.
+        *
+        * @return int error mode
+        * @access public
+        */
        function getMode() {
                return $this->mode;
        }
@@ -230,6 +238,12 @@ class PEAR_Error
     // }}}
     // {{{ getCallback()
 
+       /**
+        * Get the callback function/method from an error object.
+        *
+        * @return mixed callback function or object/method array
+        * @access public
+        */
        function getCallback() {
                return $this->callback;
        }
@@ -242,6 +256,7 @@ class PEAR_Error
         * Get the error message from an error object.
         *
         * @return      string  full error message
+        * @access public
         */
        function getMessage ()
        {
@@ -257,6 +272,7 @@ class PEAR_Error
         * Get error code from an error object
         *
         * @return int error code
+        * @access public
         */
         function getCode()
         {
@@ -270,6 +286,7 @@ class PEAR_Error
         * Get the name of this error/exception.
         *
         * @return string error/exception name (type)
+        * @access public
         */
        function getType ()
        {
@@ -283,6 +300,7 @@ class PEAR_Error
         * Get additional debug information supplied by the application.
         *
         * @return string debug information
+        * @access public
         */
        function getDebugInfo ()
        {
@@ -295,7 +313,8 @@ class PEAR_Error
        /**
         * Make a string representation of this object.
         *
-        * @return string a string with an object "summary"
+        * @return string a string with an object summary
+        * @access public
         */
        function toString() {
                $modes = array();