C# Class NServiceMVC.ServiceException

An exception that causes the REST service to return a specific http status code and
Inheritance: System.Exception, IServiceException
Mostra file Open project: gregmac/NServiceMVC

Public Methods

Method Description
ServiceException ( System statusCode, object model ) : System

Return a specific HTTP status code with the specified model as the content. The model will be serialized according to the accept-types, just like a normal service response.

ServiceException ( object model ) : System

Throw a 500 - Internal Server Error, with the specified model as the content. The model will be serialized according to the accept-types, just like a normal service response.

Method Details

ServiceException() public method

Return a specific HTTP status code with the specified model as the content. The model will be serialized according to the accept-types, just like a normal service response.
public ServiceException ( System statusCode, object model ) : System
statusCode System
model object
return System

ServiceException() public method

Throw a 500 - Internal Server Error, with the specified model as the content. The model will be serialized according to the accept-types, just like a normal service response.
public ServiceException ( object model ) : System
model object
return System