namespace: Serenity.Services assembly: Serenity.Net.Web
Converts the exception object to a service response
public static TResponse ConvertToResponse<TResponse>(this Exception exception,
HttpContext httpContext)
where TResponse : ServiceResponse, new()
parameter | description |
---|---|
TResponse | Response object |
exception | Exception |
httpContext | HTTP context |
- class TResponse
- class ServiceResponse
- class EndpointExtensions
namespace: Serenity.Services assembly: Serenity.Net.Web
Convert the exception to a service response
public static TResponse ConvertToResponse<TResponse>(this Exception exception, ILogger logger,
ITextLocalizer localizer, bool showDetails)
where TResponse : ServiceResponse, new()
parameter | description |
---|---|
TResponse | |
exception | Exception |
logger | Exception logger |
localizer | Text localizer |
showDetails | True to show details |
- class TResponse
- interface ITextLocalizer
- class ServiceResponse
- class EndpointExtensions