]> granicus.if.org Git - php/commitdiff
Throw exception during ctor
authorWez Furlong <wez@php.net>
Tue, 25 May 2004 12:03:41 +0000 (12:03 +0000)
committerWez Furlong <wez@php.net>
Tue, 25 May 2004 12:03:41 +0000 (12:03 +0000)
ext/pdo_mysql/mysql_driver.c

index 6cb2dde99ce821d05c147a527387dd3b20614cae..037f6ffea3ef28aeff64df657cee8680bf9423bb 100755 (executable)
@@ -116,6 +116,11 @@ int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int lin
                        break;
        }
 
+       if (!dbh->methods) {
+               zend_throw_exception_ex(php_pdo_get_exception(), *pdo_err TSRMLS_CC, "[%d] %s",
+                               einfo->errcode, einfo->errmsg);
+       }
+       
        return einfo->errcode;
 }
 /* }}} */