.NET开发

本类阅读TOP10

·NHibernate快速指南(翻译)
·vs.net 2005中文版下载地址收藏
·【小技巧】一个判断session是否过期的小技巧
·VB/ASP 调用 SQL Server 的存储过程
·?dos下编译.net程序找不到csc.exe文件
·通过Web Services上传和下载文件
·学习笔记(补)《.NET框架程序设计(修订版)》--目录
·VB.NET实现DirectDraw9 (2) 动画
·VB.NET实现DirectDraw9 (1) 托管的DDraw
·建站框架规范书之——文件命名

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
Microsoft Application Block for .NET - Exception

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

Microsoft Application Block for .NET

- Exception

  1. 工作流

The flow of logic when the Exception Management Application Block is used to publish an exception illustrated in the preceding diagram is as follows:

1)      The application throws an exception, which can be derived from the BaseApplicationException class provided in the Exception Management Application Block.

2)      The application calls the Publish method of the ExceptionManager class.

3)      The ExceptionManager class uses the ExceptionManagerSectionHandler class to retrieve the application’s exception management settings.

4)      The exception management settings in the application’s configuration file (if any) are read to determine how the exception should be published.

5)      If no settings are found, the exception is published in the Windows Event Log by using the DefaultPublisher class. If the application has exception management settings configured, the publishers listed in the configuration file, which can include the DefaultPublisher class and custom publisher classes, are used to publish the exception. All publishers implement at least one of the interfaces defined in the Interfaces assembly.

6)      If an exception occurs while publishing through a custom publisher, the exception manager raises a CustomPublisherException, and uses the default publisher to publish it in the Windows Event Log.

 

  1. Cache 的主要接口

·        IExceptionPublisher

例外发布器,Exception Framework提供的有:DefaultPublisher(发布到系统的事件日志)

·        IExceptionXmlPublisher

 

  1. 主要类

ExceptionManager

 

  1. 配置文件

主要对使用的例外发布器进行配置。

 

 

  1. 调用方法

ExceptionManager.Publish(Exception, additionalInfo);

 

  1. 其他

为确保你的OS的事件日志功能已启动,你应该使用ExceptionManagerInstaller类在安装时去安装它




相关文章

相关软件