MySQL pool: added exception handling.