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

                        }

                    }

     

     

  • 相关阅读:
    Linux学习之查看是否安装软件
    Linux学习之nfs实例
    Linux学习之nfs安装配置
    Linux 学习之防火墙配置
    Linux学习之系统时间同步
    Linux学习之守护进程详解
    Linux学习之Center os网络配置
    Linux学习之挂载操作
    Linux学习之挂载
    Linux学习之开机启动
  • 原文地址:https://www.cnblogs.com/quietwalk/p/2283760.html
Copyright © 2011-2022 走看看