C# Class 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"); } } ]]>
Inheritance: IMonoRailExtension, IExceptionProcessor
ファイルを表示 Open project: nats/castle-1.0.3-mono

Public Methods

Method Description
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

Private Methods

Method Description
InstallExceptionHandler ( XmlNode node, String typeName ) : void

Installs the exception handler.

OnException ( IRailsEngineContext context ) : void

Called when an exception happens.

Method Details

ProcessException() public method

Initiates the ExceptionChainingExtension manualy
public ProcessException ( Exception exception ) : void
exception System.Exception The exception to process
return void

Service() public method

Services the specified provider.
public Service ( IServiceProvider provider ) : void
provider IServiceProvider The provider.
return void

SetExtensionConfigNode() public method

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
return void