try
{
service.AddOperateLog(mol);
}
catch (Exception ex)
{
if (service.InnerChannel.State == System.ServiceModel.CommunicationState.Faulted)
{
service = new QhrServiceClient();
MyExceptionRecord my = new MyExceptionRecord();
my.Id = System.Guid.NewGuid().ToString();
my.OccurrenceTime = DateTime.Now;
my.ExceptionType = "Operation";
my.OperationName = "AddOperateLog";
my.ExceptionMessage = ex.Message;
my.Status = 1;
service.CreateExceptionRecord(my);
}
}