ServiceStack.HttpResponseExtensionsInternal.WriteError C# (CSharp) Méthode

WriteError() public static méthode

public static WriteError ( this httpRes, Exception ex, int statusCode = 500, string errorMessage = null, string contentType = null ) : System.Threading.Tasks.Task
httpRes this
ex System.Exception
statusCode int
errorMessage string
contentType string
Résultat System.Threading.Tasks.Task
        public static Task WriteError(this IResponse httpRes, Exception ex, int statusCode = 500, string errorMessage = null, string contentType = null)
        {
            return httpRes.WriteErrorToResponse(httpRes.Request,
                contentType ?? httpRes.Request.ResponseContentType ?? HostContext.Config.DefaultContentType,
                httpRes.Request.OperationName,
                errorMessage,
                ex,
                statusCode);
        }

Same methods

HttpResponseExtensionsInternal::WriteError ( this httpRes, IRequest httpReq, object dto, string errorMessage ) : void
HttpResponseExtensionsInternal::WriteError ( this httpRes, object dto, string errorMessage ) : void