惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - 光阴的故事-SKY

基于.NET平台常用的框架整理 My 2016 如何做好一个保安队长。 Jax 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 我的2014 teee 师说 韩愈 荀子·劝学 parallelActivity EventHandlingScopeActivity 获取容器内的所有节点 workflow 角色的使用关键 ConditionedActivityGroup 浅谈 Workflow 的角色控制的优势与局限 数据库的数据 转化为XML 在页面上浏览 自定义用户跟踪
ThrowActivity
光阴的故事-SKY · 2007-12-26 · via 博客园 - 光阴的故事-SKY
 

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