zoukankan      html  css  js  c++  java
  • ThrowActivity 光阴的故事

     

    1. 一个抛出异常的结点 可以把异常的内容给写出来

    2. 该结点将一个自定义的异常对象抛给引擎,会触发引擎的OnWorkflowTerminated事件

    3. 引擎OnWorkflowTerminated事件的e.Exception可得到异常的信息

    4.使用该结点

    Fault属性:用于绑定到一个异常实例(自定义的异常类的对象)

    FaultType属性:指定Fault属性绑定的异常实例的类

    使用
    public DiscontinuedProductException discontinuedProductException1 = new DiscontinuedProductException();


    定义

        [SerializableAttribute()]
        public class DiscontinuedProductException : Exception
        {
            public DiscontinuedProductException()
                : base()
            {
            }

            public DiscontinuedProductException(string message)
                : base(message)
            {
            }

            public DiscontinuedProductException(string message, Exception innerException)
                : base(message, innerException)
            {
            }

            protected DiscontinuedProductException(SerializationInfo info, StreamingContext context)
                : base(info, context)
            {
            }
        }





    抛出

            static void OnWorkflowTerminated(object sender, WorkflowTerminatedEventArgs e)
            {
                Console.WriteLine(e.Exception.Message);
                waitHandle.Set();
            }
  • 相关阅读:
    mysql 防止插入某个字段重复的值
    vue 脚手架的目录结构
    搭建Vue 脚手架项目
    flex 布局的页面
    Java List 排序问题
    maven 管理oracle jar
    JPA 注解
    PL/SQL Developer 不显示系统表,默认显示My objects
    jquery面试题
    web前端课程检测2
  • 原文地址:https://www.cnblogs.com/xinhua327/p/1015667.html
Copyright © 2011-2022 走看看