C# Класс Castle.MonoRail.Framework.Extensions.ExceptionChaining.ExceptionChainingExtension

This extension allow one to perform one or more steps in response to an exception threw by an action. IExceptionHandler
To successfully install this extension you must register it on the extensions node and the handlers within the exception node: <monorail> <extensions> <extension type="Castle.MonoRail.Framework.Extensions.ExceptionChaining.ExceptionChainingExtension, Castle.MonoRail.Framework" /> </extensions> <exception> <exceptionHandler type="Type name that implements IExceptionHandler" /> <exceptionHandler type="Type name that implements IExceptionHandler" /> </exception> </monorail>

Controllers can request IExceptionProcessor through IServiceProvider and invoke the handlers to process an exception

(); exProcessor.ProcessException(ex); RenderView("CouldNotBuyMercedes"); } } ]]>
Наследование: IMonoRailExtension, IExceptionProcessor
Показать файл Открыть проект

Открытые методы

Метод Описание
ProcessException ( Exception exception ) : void

Initiates the ExceptionChainingExtension manualy

Service ( IServiceProvider provider ) : void

Services the specified provider.

SetExtensionConfigNode ( XmlNode node ) : void

Gives to the extension implementor a chance to read attributes and child nodes of the extension node

Приватные методы

Метод Описание
InstallExceptionHandler ( XmlNode node, String typeName ) : void

Installs the exception handler.

OnException ( IRailsEngineContext context ) : void

Called when an exception happens.

Описание методов

ProcessException() публичный Метод

Initiates the ExceptionChainingExtension manualy
public ProcessException ( Exception exception ) : void
exception System.Exception The exception to process
Результат void

Service() публичный Метод

Services the specified provider.
public Service ( IServiceProvider provider ) : void
provider IServiceProvider The provider.
Результат void

SetExtensionConfigNode() публичный Метод

Gives to the extension implementor a chance to read attributes and child nodes of the extension node
public SetExtensionConfigNode ( XmlNode node ) : void
node XmlNode The node that defines the MonoRail extension
Результат void