Container of ClientError and Error Entity.
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientException"/> class.
 /// </summary>
 /// <param name="message">The corresponding error message.</param>
 /// <param name="innerException">The inner exception.</param>
 public ClientException(string message, Exception innerException)
     : base(message, innerException)
 {
     Error = new ClientError()
     {
         Code = HttpStatusCode.InternalServerError.ToString(),
         Message = message
     };
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientException"/> class.
 /// </summary>
 /// <param name="message">The corresponding error message.</param>
 /// <param name="innerException">The inner exception.</param>
 public ClientException(string message, Exception innerException)
     : base(message, innerException)
 {
     Error = new ClientError()
     {
         Code    = HttpStatusCode.InternalServerError.ToString(),
         Message = message
     };
 }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ClientException"/> class.
        /// </summary>
        /// <param name="message">The corresponding error message.</param>
        /// <param name="errorCode">The error code.</param>
        /// <param name="httpStatus">The http status.</param>
        /// <param name="innerException">The inner exception.</param>
        public ClientException(string message, string errorCode, HttpStatusCode httpStatus, Exception innerException)
            : base(message, innerException)
        {
            HttpStatus = httpStatus;

            Error = new ClientError()
            {
                Code    = errorCode,
                Message = message
            };
        }
Esempio n. 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ClientException"/> class.
        /// </summary>
        /// <param name="message">The corresponding error message.</param>
        /// <param name="httpStatus">The Http Status code.</param>
        public ClientException(string message, HttpStatusCode httpStatus)
            : base(message)
        {
            HttpStatus = httpStatus;

            Error = new ClientError()
            {
                Code    = HttpStatus.ToString(),
                Message = message
            };
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ClientException"/> class.
        /// </summary>
        /// <param name="message">The corresponding error message.</param>
        /// <param name="errorCode">The error code.</param>
        /// <param name="httpStatus">The http status.</param>
        /// <param name="innerException">The inner exception.</param>
        public ClientException(string message, string errorCode, HttpStatusCode httpStatus, Exception innerException)
            : base(message, innerException)
        {
            HttpStatus = httpStatus;

            Error = new ClientError()
            {
                Code = errorCode,
                Message = message
            };
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ClientException"/> class.
        /// </summary>
        /// <param name="message">The corresponding error message.</param>
        /// <param name="httpStatus">The Http Status code.</param>
        public ClientException(string message, HttpStatusCode httpStatus)
            : base(message)
        {
            HttpStatus = httpStatus;

            Error = new ClientError()
            {
                Code = HttpStatus.ToString(),
                Message = message
            };
        }
Esempio n. 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientException"/> class.
 /// </summary>
 /// <param name="error">The error entity.</param>
 /// <param name="httpStatus">The http status.</param>
 public ClientException(ClientError error, HttpStatusCode httpStatus)
 {
     Error      = error;
     HttpStatus = httpStatus;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientException"/> class.
 /// </summary>
 /// <param name="error">The error entity.</param>
 /// <param name="httpStatus">The http status.</param>
 public ClientException(ClientError error, HttpStatusCode httpStatus)
 {
     this.Error = error;
     this.HttpStatus = httpStatus;
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientException"/> class.
 /// </summary>
 /// <param name="error">The error entity.</param>
 /// <param name="httpStatus">The http status.</param>
 public ClientException(ClientError error, HttpStatusCode httpStatus)
 {
     this.Error      = error;
     this.HttpStatus = httpStatus;
 }
Esempio n. 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientException"/> class.
 /// </summary>
 /// <param name="error">The error entity.</param>
 /// <param name="httpStatus">The http status.</param>
 public ClientException(ClientError error, HttpStatusCode httpStatus)
     : base(error?.Message)
 {
     this.Error      = error;
     this.HttpStatus = httpStatus;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientException"/> class.
 /// </summary>
 /// <param name="error">The error entity.</param>
 /// <param name="httpStatus">The http status.</param>
 public ClientException(ClientError error, HttpStatusCode httpStatus)
 {
     Error = error;
     HttpStatus = httpStatus;
 }