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);

                    }

                }

 

 

相关文章:

  • 2021-05-20
  • 2022-12-23
  • 2021-11-18
  • 2022-02-01
  • 2019-12-12
  • 2021-07-19
  • 2021-06-15
猜你喜欢
  • 2022-12-23
  • 2021-11-21
  • 2021-11-25
  • 2022-02-01
  • 2019-07-09
  • 2022-12-23
  • 2021-10-09
相关资源
相似解决方案