C# Class Solita.Episerver.WebApi.EpiserverWebApiErrorHandler

Logs all expections using EPiServer.Logging.ILogger. The handler returns HTTP 500 status with a message "An error has occurred" for end users. But for admin/editor/locahost users the full exception is displayed to ease debugging.
Inheritance: System.Web.Http.ExceptionHandling.ExceptionHandler
Mostrar archivo Open project: solita/episerver-webapi

Public Methods

Method Description
Handle ( System.Web.Http.ExceptionHandling.ExceptionHandlerContext context ) : void

Private Methods

Method Description
IsEditorOrAdmin ( IPrincipal user ) : bool
ShowDetailedError ( ) : bool

Method Details

Handle() public method

public Handle ( System.Web.Http.ExceptionHandling.ExceptionHandlerContext context ) : void
context System.Web.Http.ExceptionHandling.ExceptionHandlerContext
return void