summaryrefslogtreecommitdiff
path: root/ext/pdo/php_pdo_int.h
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2004-05-20 00:05:22 +0000
committerWez Furlong <wez@php.net>2004-05-20 00:05:22 +0000
commite7c72f8455ed26087bbf974723179fbf77696280 (patch)
treeb9bece7152c29793f858832fcbdf9b6d60cad18f /ext/pdo/php_pdo_int.h
parent08ce920c9ed3107da694797777b3bbc6a4b75dbe (diff)
downloadphp-git-e7c72f8455ed26087bbf974723179fbf77696280.tar.gz
First cut at a "unified" error handling API. The main thing that is missing
currently is a switch in the dbh to indicate what to do with the errors.
Diffstat (limited to 'ext/pdo/php_pdo_int.h')
-rwxr-xr-xext/pdo/php_pdo_int.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h
index 97e969889b..2915ee2017 100755
--- a/ext/pdo/php_pdo_int.h
+++ b/ext/pdo/php_pdo_int.h
@@ -36,6 +36,14 @@ extern zend_object_handlers pdo_dbstmt_object_handlers;
extern pdo_driver_t *pdo_find_driver(const char *name, int namelen);
+extern void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC);
+
+#define PDO_DBH_CLEAR_ERR() dbh->error_code = PDO_ERR_NONE
+#define PDO_STMT_CLEAR_ERR() stmt->error_code = PDO_ERR_NONE
+#define PDO_HANDLE_DBH_ERR() pdo_handle_error(dbh, NULL TSRMLS_CC)
+#define PDO_HANDLE_STMT_ERR() pdo_handle_error(stmt->dbh, stmt TSRMLS_CC)
+
+
/*
* Local variables:
* tab-width: 4