make exception->map smarter for SQLExceptions