Disable exception chaining for DB errors

This commit is contained in:
Kijin Sung 2022-11-06 19:13:43 +09:00
parent e94146b490
commit e03ee87345

View file

@ -123,7 +123,7 @@ class DB
}
catch (\PDOException $e)
{
throw new Exceptions\DBError($e->getMessage(), 0, $e);
throw new Exceptions\DBError($e->getMessage());
}
// Get the DB version.
@ -541,7 +541,7 @@ class DB
}
catch (\PDOException $e)
{
throw new Exceptions\DBError($e->getMessage(), 0, $e);
throw new Exceptions\DBError($e->getMessage());
}
if ($result_type === 'auto' && $last_index === 0 && count($result) <= 1)