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
Type | Name |
---|---|
ServiceStack.ResponseStatus | status |
IsError(ResponseStatus)
View Source
Declaration
public static bool IsError(this ResponseStatus status)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.ResponseStatus | status |
FieldError(ResponseStatus, String)
View Source
Declaration
public static ResponseError FieldError(this ResponseStatus status, string fieldName)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.ResponseStatus | status |
System.String | fieldName |
FieldErrorMessage(ResponseStatus, String)
View Source
Declaration
public static string FieldErrorMessage(this ResponseStatus status, string fieldName)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.ResponseStatus | status |
System.String | fieldName |
HasErrorField(ResponseStatus, String)
View Source
Declaration
public static bool HasErrorField(this ResponseStatus status, string fieldName)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.ResponseStatus | status |
System.String | fieldName |
ShowSummary(ResponseStatus, String[])
View Source
Declaration
public static bool ShowSummary(this ResponseStatus status, params string[] exceptFields)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.ResponseStatus | status |
System.String[] | exceptFields |
SummaryMessage(ResponseStatus, String[])
View Source
Declaration
public static string SummaryMessage(this ResponseStatus status, params string[] exceptFields)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.ResponseStatus | status |
System.String[] | exceptFields |
AsResponseStatus(Exception)
View Source
Declaration
public static ResponseStatus AsResponseStatus(this Exception ex)
Returns
Parameters
Type | Name |
---|---|
System.Exception | ex |
CreateError(Exception)
View Source
Declaration
public static ResponseStatus CreateError(Exception ex)
Returns
Parameters
Type | Name |
---|---|
System.Exception | ex |
CreateError(String, String)
View Source
Declaration
public static ResponseStatus CreateError(string message, string errorCode = "Exception")
Returns
Parameters
Type | Name |
---|---|
System.String | message |
System.String | errorCode |
CreateFieldError(String, String, String)
View Source
Declaration
public static ResponseStatus CreateFieldError(string fieldName, string errorMessage, string errorCode = "ValidationException")
Returns
Parameters
Type | Name |
---|---|
System.String | fieldName |
System.String | errorMessage |
System.String | errorCode |
AddFieldError(ResponseStatus, String, String, String)
View Source
Declaration
public static ResponseStatus AddFieldError(this ResponseStatus status, string fieldName, string errorMessage, string errorCode = "ValidationException")
Returns
Parameters
Type | Name |
---|---|
ServiceStack.ResponseStatus | status |
System.String | fieldName |
System.String | errorMessage |
System.String | errorCode |