added unit tests
This commit is contained in:
@ -56,6 +56,9 @@ function qdb_handler_fail(
|
||||
?string $tmpDb = null,
|
||||
$lockFp = null
|
||||
): never {
|
||||
if (defined('QDB_TESTING') && qdb_test_is_control_flow_exception($e)) {
|
||||
throw $e;
|
||||
}
|
||||
if ($pdo !== null && $pdo->inTransaction()) {
|
||||
try {
|
||||
$pdo->rollBack();
|
||||
@ -74,6 +77,9 @@ function qdb_handler_fail(
|
||||
*/
|
||||
function qdb_emit_api_error(Throwable $e, string $contextLabel): never
|
||||
{
|
||||
if (defined('QDB_TESTING') && qdb_test_is_control_flow_exception($e)) {
|
||||
throw $e;
|
||||
}
|
||||
if (function_exists('qdb_api_log_note_exception')) {
|
||||
qdb_api_log_note_exception($e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user