Switched to exception-based DB error handling.