Skip to main content

ErrorUtils

Assembly: ServiceStack.Client.dll
View Source
Declaration
public static class ErrorUtils

Fields

FieldErrorCode

View Source
Declaration
public const string FieldErrorCode = "ValidationException"

Methods

IsSuccess(ResponseStatus)

View Source
Declaration
public static bool IsSuccess(this ResponseStatus status)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.ResponseStatusstatus

IsError(ResponseStatus)

View Source
Declaration
public static bool IsError(this ResponseStatus status)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.ResponseStatusstatus

FieldError(ResponseStatus, String)

View Source
Declaration
public static ResponseError FieldError(this ResponseStatus status, string fieldName)
Returns

ServiceStack.ResponseError

Parameters
TypeName
ServiceStack.ResponseStatusstatus
System.StringfieldName

FieldErrorMessage(ResponseStatus, String)

View Source
Declaration
public static string FieldErrorMessage(this ResponseStatus status, string fieldName)
Returns

System.String

Parameters
TypeName
ServiceStack.ResponseStatusstatus
System.StringfieldName

HasErrorField(ResponseStatus, String)

View Source
Declaration
public static bool HasErrorField(this ResponseStatus status, string fieldName)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.ResponseStatusstatus
System.StringfieldName

ShowSummary(ResponseStatus, String[])

View Source
Declaration
public static bool ShowSummary(this ResponseStatus status, params string[] exceptFields)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.ResponseStatusstatus
System.String[]exceptFields

SummaryMessage(ResponseStatus, String[])

View Source
Declaration
public static string SummaryMessage(this ResponseStatus status, params string[] exceptFields)
Returns

System.String

Parameters
TypeName
ServiceStack.ResponseStatusstatus
System.String[]exceptFields

AsResponseStatus(Exception)

View Source
Declaration
public static ResponseStatus AsResponseStatus(this Exception ex)
Returns

ServiceStack.ResponseStatus

Parameters
TypeName
System.Exceptionex

CreateError(Exception)

View Source
Declaration
public static ResponseStatus CreateError(Exception ex)
Returns

ServiceStack.ResponseStatus

Parameters
TypeName
System.Exceptionex

CreateError(String, String)

View Source
Declaration
public static ResponseStatus CreateError(string message, string errorCode = "Exception")
Returns

ServiceStack.ResponseStatus

Parameters
TypeName
System.Stringmessage
System.StringerrorCode

CreateFieldError(String, String, String)

View Source
Declaration
public static ResponseStatus CreateFieldError(string fieldName, string errorMessage, string errorCode = "ValidationException")
Returns

ServiceStack.ResponseStatus

Parameters
TypeName
System.StringfieldName
System.StringerrorMessage
System.StringerrorCode

AddFieldError(ResponseStatus, String, String, String)

View Source
Declaration
public static ResponseStatus AddFieldError(this ResponseStatus status, string fieldName, string errorMessage, string errorCode = "ValidationException")
Returns

ServiceStack.ResponseStatus

Parameters
TypeName
ServiceStack.ResponseStatusstatus
System.StringfieldName
System.StringerrorMessage
System.StringerrorCode