• 客户端异常处理



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

                        }

                    }

     

     

  • 相关阅读:
    NC 6系总账凭证联查原始单据
    NCUAP 利用java自带方法实现导入excel取数据
    NC 5导出Excel
    nc 画界面,触发效果(第一种)
    nc6 用业务插件注册来跑按钮事件
    NC 自定义参照类
    SVN忘记登陆用户
    Oracle 忘记sys与system管理员密码重置操作
    OC-之AFNetworking
    OC-之NSDate、万年历
  • 原文地址:https://www.cnblogs.com/quietwalk/p/2283760.html
Copyright © 2020-2023  润新知