Show / Hide Table of Contents

Class ProductsAndPricingException

Exception thrown to indicate web service errors

Inheritance
System.Object
System.Exception
ProductsAndPricingException
Implements
System.Runtime.Serialization.ISerializable
Inherited Members
System.Exception.GetBaseException()
System.Exception.GetType()
System.Exception.ToString()
System.Exception.Data
System.Exception.HelpLink
System.Exception.HResult
System.Exception.InnerException
System.Exception.Message
System.Exception.Source
System.Exception.StackTrace
System.Exception.TargetSite
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: EC.ProductsAndPricing.Client
Assembly: EC.ProductsAndPricing.Client.dll
Syntax
[Serializable]
public class ProductsAndPricingException : Exception, ISerializable

Constructors

View Source

ProductsAndPricingException(SerializationInfo, StreamingContext)

Deserialize an exception

Declaration
protected ProductsAndPricingException(SerializationInfo info, StreamingContext ctx)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

Provided by binary serializer

System.Runtime.Serialization.StreamingContext ctx

Proviced by binary serializer

View Source

ProductsAndPricingException(String, HttpStatusCode, String, JObject, String)

Constructor

Declaration
public ProductsAndPricingException(string message, HttpStatusCode code, string errorCode, JObject body, string stackTrace)
Parameters
Type Name Description
System.String message

The error message

System.Net.HttpStatusCode code

The status code

System.String errorCode

The error code

Newtonsoft.Json.Linq.JObject body

The error response body, or null if there wasn't one

System.String stackTrace

The remote stack trace, or null if there wasn't one

Properties

View Source

ErrorCode

The error code returned by the service.

Declaration
public string ErrorCode { get; }
Property Type: System.String
View Source

HttpStatus

The http status code returned.

Declaration
public HttpStatusCode HttpStatus { get; }
Property Type: System.Net.HttpStatusCode

Methods

View Source

GetFieldErrors()

Get details of validation errors.

Declaration
public IEnumerable<ResponseError> GetFieldErrors()
Returns
Type Description
System.Collections.Generic.IEnumerable<ResponseError>
View Source

GetObjectData(SerializationInfo, StreamingContext)

Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info
System.Runtime.Serialization.StreamingContext context
Overrides
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
View Source

TryReadBody<T>(out T)

Try to read the response body

Declaration
public bool TryReadBody<T>(out T obj)
Parameters
Type Name Description
T obj

The object read

Returns
Type Description
System.Boolean

true if the response could be parsed, false otherwise

Type Parameters
Name Description
T

The type of response body

  • View Source
Back to top Copyright © 2017 EC English