Adapted exception handling to latest dbal changes