C# Class JsonFx.Mvc.ErrorResult

An action result for returning a custom non-UI error status.
Inheritance: HttpResult
Mostrar archivo Open project: pocket-playlab/jsonfx-v1

Public Methods

Method Description
ErrorResult ( Exception ex ) : System

Ctor

Protected Methods

Method Description
EnsureException ( Exception ex ) : Exception

Ensures the exception is not null and unwraps standard wrapper exceptions

GetStatusCode ( Exception ex ) : HttpStatusCode

Determines the best HTTP status code for the exception

Method Details

EnsureException() protected method

Ensures the exception is not null and unwraps standard wrapper exceptions
protected EnsureException ( Exception ex ) : Exception
ex System.Exception
return System.Exception

ErrorResult() public method

Ctor
public ErrorResult ( Exception ex ) : System
ex System.Exception
return System

GetStatusCode() protected method

Determines the best HTTP status code for the exception
protected GetStatusCode ( Exception ex ) : HttpStatusCode
ex System.Exception
return HttpStatusCode