summaryrefslogtreecommitdiff
path: root/ext/dba
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2002-06-26 07:54:00 +0000
committerDerick Rethans <derick@php.net>2002-06-26 07:54:00 +0000
commitf57306cdd961ae630fb17903cc5b960cf2628102 (patch)
tree0196cd08822b37cee79b6cf1e7f249c94e914f18 /ext/dba
parent1f58a8f087784f032e579082aa699e718f1bba5b (diff)
downloadphp-git-f57306cdd961ae630fb17903cc5b960cf2628102.tar.gz
Unify error messages
Diffstat (limited to 'ext/dba')
-rw-r--r--ext/dba/dba.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/ext/dba/dba.c b/ext/dba/dba.c
index 4b40983208..cb0d7088b6 100644
--- a/ext/dba/dba.c
+++ b/ext/dba/dba.c
@@ -117,9 +117,10 @@ typedef struct dba_handler {
#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 @@ typedef struct dba_handler {
/* 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 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
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 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
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 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
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;
}