cvs: php4 /ext/dba dba.c

From: Date: Wed, 26 Jun 2002 07:52:01 +0000
Subject: cvs: php4 /ext/dba dba.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12534@lists.php.net to get a copy of this message
derick Wed Jun 26 03:52:01 2002 EDT Modified files: /php4/ext/dba dba.c Log: Unify error messages Index: php4/ext/dba/dba.c diff -u php4/ext/dba/dba.c:1.42 php4/ext/dba/dba.c:1.43 --- php4/ext/dba/dba.c:1.42 Thu Feb 28 03:25:57 2002 +++ php4/ext/dba/dba.c Wed Jun 26 03:51:59 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba.c,v 1.42 2002/02/28 08:25:57 sebastian Exp $ */ +/* $Id: dba.c,v 1.43 2002/06/26 07:51:59 derick Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -117,9 +117,10 @@ #define DBA_ID_GET \ convert_to_long_ex(id); \ - DBA_IF_NOT_CORRECT_TYPE(Z_LVAL_PP(id)) { \ - php_error(E_WARNING, "Unable to find DBA identifier %d", \ - Z_LVAL_PP(id)); \ + DBA_IF_NOT_CORRECT_TYPE(Z_LVAL_PP(id)) { \ + php_error(E_WARNING, "%s(): Unable to find DBA identifier %d", \ + get_active_function_name(TSRMLS_C), \ + Z_LVAL_PP(id)); \ RETURN_FALSE; \ } @@ -138,7 +139,7 @@ /* check whether the user has write access */ #define DBA_WRITE_CHECK \ if(info->mode != DBA_WRITER && info->mode != DBA_TRUNC && info->mode != DBA_CREAT) { \ - php_error(E_WARNING, "you cannot perform a modification to a database without proper access"); \ + php_error(E_WARNING, "%s(): you cannot perform a modification to a database without proper access", get_active_function_name(TSRMLS_C)); \ RETURN_FALSE; \ } @@ -317,7 +318,7 @@ strcasecmp(hptr->name, Z_STRVAL_PP(args[2])); hptr++); if(!hptr->name) { - php_error(E_WARNING, "no such handler: %s", Z_STRVAL_PP(args[2])); + php_error(E_WARNING, "%s(): no such handler: %s", get_active_function_name(TSRMLS_C), Z_STRVAL_PP(args[2])); FREENOW; RETURN_FALSE; } @@ -336,7 +337,7 @@ modenr = DBA_TRUNC; break; default: - php_error(E_WARNING, "illegal DBA mode: %s", Z_STRVAL_PP(args[1])); + php_error(E_WARNING, "%s(): illegal DBA mode: %s", get_active_function_name(TSRMLS_C), Z_STRVAL_PP(args[1])); FREENOW; RETURN_FALSE; } @@ -351,7 +352,7 @@ if(hptr->open(info TSRMLS_CC) != SUCCESS) { dba_close(info); - php_error(E_WARNING, "driver initialization failed"); + php_error(E_WARNING, "%s(): driver initialization failed", get_active_function_name(TSRMLS_C)); FREENOW; RETURN_FALSE; }

« previous php.cvs (#12534) next »