C# Class Alloy.Business.Rendering.ErrorHandlingContentRenderer

Wraps an MvcContentRenderer and adds error handling to ensure that blocks and other content rendered as parts of pages won't crash the entire page if a non-critical exception occurs while rendering it.
Prints an error message for editors so that they can easily report errors to developers.
Inheritance: IContentRenderer
Datei anzeigen Open project: episerver/EPiTranslateFlowDemo

Public Methods

Method Description
ErrorHandlingContentRenderer ( MvcContentRenderer mvcRenderer ) : System
Render ( HtmlHelper helper, PartialRequest partialRequestHandler, IContentData contentData, TemplateModel templateModel ) : void

Renders the contentData using the wrapped renderer and catches common, non-critical exceptions.

Private Methods

Method Description
HandlerError ( HtmlHelper helper, IContentData contentData, Exception renderingException ) : void

Method Details

ErrorHandlingContentRenderer() public method

public ErrorHandlingContentRenderer ( MvcContentRenderer mvcRenderer ) : System
mvcRenderer MvcContentRenderer
return System

Render() public method

Renders the contentData using the wrapped renderer and catches common, non-critical exceptions.
public Render ( HtmlHelper helper, PartialRequest partialRequestHandler, IContentData contentData, TemplateModel templateModel ) : void
helper HtmlHelper
partialRequestHandler PartialRequest
contentData IContentData
templateModel TemplateModel
return void