dibi
dibi copied to clipboard
PDO: Support for PDO::ERRMODE_EXCEPTION
- new feature, no existing code will break (full bc)
I added support for PDO in PDO::ERRMODE_EXCEPTION error mode using a single try-catch block.
👉 Since in PHP 8 PDO::ERRMODE_EXCEPTION is the default, this is also useful for your master branch.
I have a use case where I need to share PDO resource and it's set with exception errmode, this solves the issue for the 4.2 branch.
There is a older attempt to implement it #293
That PR solves a different issue.
And since the PR(s) mentioned are over 3 years old, I'm not expecting them merged any time soon.
This PR does not introduce BC break in any way, it only adds the option to use the exception error mode without any change in behaviour of dibi.
bump.