@beberlei @stof The whole point is not about introducing a new class to handle the driver exception but actually USE the existing ones to do that. If an error is raised by the driver it is catched in the driver's collaborators `Connection` and `Statement` and wrapped into the already existing driver's exception class. If now those driver exception classes would implement a driver exception interface to handle error codes, where is the overhead? The only exception is for PDO driver where we indeed would have to wrap the native PDOException in order to make it implement the driver exception.
I get your points indeed and agree that we should not make things overcomplicated but still I think this approach would not generate too much overhead as you said.
Just my two cents ;)