diff options
author | Marcus Boerger <helly@php.net> | 2003-08-25 20:55:14 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-08-25 20:55:14 +0000 |
commit | 0bd1567fe1960fab749e90a3a845efdedf9aaa38 (patch) | |
tree | d2bfbf5162cc1d546c07d859553412eab1be5868 | |
parent | b7d325991d6b75ccc69ebcf915a5b6e61512f86e (diff) | |
download | php-git-0bd1567fe1960fab749e90a3a845efdedf9aaa38.tar.gz |
Update exception code
-rw-r--r-- | ext/sqlite/sqlite.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 50d36f8469..da134d7140 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -119,19 +119,7 @@ PHP_INI_END() #define SQLITE_THROW(message) \ PG(suppress_errors) = 0; \ - EG(exception) = sqlite_instanciate(sqlite_ce_exception, NULL TSRMLS_CC); \ - { \ - zval *tmp; \ - MAKE_STD_ZVAL(tmp); \ - ZVAL_STRING(tmp, message, 1); \ - zend_hash_update(Z_OBJPROP_P(EG(exception)), "message", sizeof("message"), (void **) message, sizeof(zval *), NULL); \ - MAKE_STD_ZVAL(tmp); \ - ZVAL_STRING(tmp, zend_get_executed_filename(TSRMLS_C), 1); \ - zend_hash_update(Z_OBJPROP_P(EG(exception)), "file", sizeof("file"), (void **) &tmp, sizeof(zval *), NULL); \ - MAKE_STD_ZVAL(tmp); \ - ZVAL_LONG(tmp, zend_get_executed_lineno(TSRMLS_C)); \ - zend_hash_update(Z_OBJPROP_P(EG(exception)), "line", sizeof("line"), (void **) &tmp, sizeof(zval *), NULL); \ - } + EG(exception) = zend_throw_exception(sqlite_ce_exception, message, 0 TSRMLS_CC); struct php_sqlite_result { struct php_sqlite_db *db; @@ -1115,7 +1103,7 @@ PHP_FUNCTION(sqlite_open) zval *errmsg = NULL; zval *object = getThis(); - php_set_error_handling(object ? EH_THROW : EH_NORMAL, zend_exception_get_default() TSRMLS_CC); + php_set_error_handling(object ? EH_THROW : EH_NORMAL, sqlite_ce_exception TSRMLS_CC); if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", &filename, &filename_len, &mode, &errmsg)) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); |