You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try {
$dibiConnection->exec("WHAT EVER WITH ERROR IN IT");
} catch (Dibi\DriverException$e) {
echo"catched";
}
output:
catched
exited (0)
Possible Solution
a. Throw exception in dibi::connect() if misconfigured PDO connection is provided.
b. Wrap connection into proxy which reconfigures temporarily connection when used by dibi (can has ugly side effects)
c. Catch exceptions in Dibi code alongside with classic error handling (increases dibi internal code complexity)
I would prefer to go with a) as it fails fast, it is simple to implement and does not have any side effects.
The text was updated successfully, but these errors were encountered:
Version: 3.1.1
Bug Description
When I configure dibi to use existing PDO connection which has configured to throw exceptions instead of throwing warnings, encapsulations is broken.
Steps To Reproduce
output:
Expected Behavior
output:
Possible Solution
a. Throw exception in
dibi::connect()
if misconfigured PDO connection is provided.b.
Wrap connection into proxy which reconfigures temporarily connection when used by dibi (can has ugly side effects)c. Catch exceptions in Dibi code alongside with classic error handling (increases dibi internal code complexity)
I would prefer to go with a) as it fails fast, it is simple to implement and does not have any side effects.
The text was updated successfully, but these errors were encountered: