summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2002-03-21 00:06:45 +0000
committerYasuo Ohgaki <yohgaki@php.net>2002-03-21 00:06:45 +0000
commit4094513915c995c593c418d654714f0496da4e8f (patch)
treed75a807b402eaf773e32de9d1dd3af79ae2bc359 /ext/pgsql/pgsql.c
parentd5e64b2287b1a8c38d29af1597af6d63a0f7e68c (diff)
downloadphp-git-4094513915c995c593c418d654714f0496da4e8f.tar.gz
Show function name in error message.
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 6e870c20b0..e795affba4 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -1130,7 +1130,8 @@ PHP_FUNCTION(pg_fetch_result)
convert_to_long_ex(row);
pgsql_row = Z_LVAL_PP(row);
if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
- php_error(E_WARNING,"Unable to jump to row %d on PostgreSQL result index %d", Z_LVAL_PP(row), Z_LVAL_PP(result));
+ php_error(E_WARNING,"%s() unable to jump to row %d on PostgreSQL result index %d",
+ get_active_function_name(TSRMLS_C), Z_LVAL_PP(row), Z_LVAL_PP(result));
RETURN_FALSE;
}
}
@@ -1144,7 +1145,8 @@ PHP_FUNCTION(pg_fetch_result)
break;
}
if (field_offset<0 || field_offset>=PQnfields(pgsql_result)) {
- php_error(E_WARNING,"Bad column offset specified");
+ php_error(E_WARNING,"%s() bad column offset specified",
+ get_active_function_name(TSRMLS_C));
RETURN_FALSE;
}
@@ -1214,7 +1216,8 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
pgsql_row = Z_LVAL_PP(row);
pg_result->row = pgsql_row;
if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
- php_error(E_WARNING, "Unable to jump to row %d on PostgreSQL result index %d", Z_LVAL_PP(row), Z_LVAL_PP(result));
+ php_error(E_WARNING, "%s() unable to jump to row %d on PostgreSQL result index %d",
+ get_active_function_name(TSRMLS_C), Z_LVAL_PP(row), Z_LVAL_PP(result));
RETURN_FALSE;
}
} else {
@@ -1324,7 +1327,8 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
convert_to_long_ex(row);
pgsql_row = Z_LVAL_PP(row);
if (pgsql_row < 0 || pgsql_row >= PQntuples(pgsql_result)) {
- php_error(E_WARNING,"Unable to jump to row %d on PostgreSQL result index %d", Z_LVAL_PP(row), Z_LVAL_PP(result));
+ php_error(E_WARNING,"%s() unable to jump to row %d on PostgreSQL result index %d",
+ get_active_function_name(TSRMLS_C), Z_LVAL_PP(row), Z_LVAL_PP(result));
RETURN_FALSE;
}
}
@@ -1340,7 +1344,7 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
break;
}
if (field_offset < 0 || field_offset >= PQnfields(pgsql_result)) {
- php_error(E_WARNING, "Bad column offset specified");
+ php_error(E_WARNING, "%s() bad column offset specified");
RETURN_FALSE;
}