Skip to content

Instantly share code, notes, and snippets.

@Romiko
Created September 27, 2011 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Romiko/1243860 to your computer and use it in GitHub Desktop.
Save Romiko/1243860 to your computer and use it in GitHub Desktop.
NodeReference<Client> TryImportClient(Node<Agency> agency, Clients client, DateTimeOffset timeFirstAttempted)
{
NodeReference<Client> reference;
var callStarted = DateTimeOffset.UtcNow;
try
{
reference = importClientService.ImportClient(client, agency);
}
catch (Exception ex)
{
Log("Error occured importing client {0}. Started this attempt at {1}. Started the very first attempt to import this client at {2}. The exception was: {3}",
client.ExternalSystemId,
callStarted,
timeFirstAttempted,
ex);
throw;
}
return reference;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment