zoukankan      html  css  js  c++  java
  • 客户端异常处理


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

                        }

                    }

     

     

  • 相关阅读:
    bzoj2045: 双亲数&bzoj1101: [POI2007]Zap
    spoj GCDEX
    jQuery Ajax
    jQuery 动画效果
    jQuery 事件处理API
    jQuery 常用getter&setter
    jQuery 文档操作
    jQuery 基础
    Vue2.2.0+新特性整理
    JavaScript中的HTTP
  • 原文地址:https://www.cnblogs.com/quietwalk/p/2283760.html
Copyright © 2011-2022 走看看