private IEnumerable<GoogleAddress> ProcessResponseAsync(RequestState requestState, IAsyncResult result)
{
if (requestState.cancellationToken != null)
requestState.cancellationToken.Value.ThrowIfCancellationRequested();
try
{
using (var response = (HttpWebResponse)requestState.request.EndGetResponse(result))
{
return ProcessWebResponse(response);
}
}
catch (GoogleGeocodingException)
{
//let these pass through
throw;
}
catch (Exception ex)
{
//wrap in google exception
throw new GoogleGeocodingException(ex);
}
}