From a78516af0d1cff720b6843c73fc8a0fc4def055e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sat, 28 Apr 2018 22:14:22 +0300 Subject: [PATCH] Impelement IHasErrorCode, IHasErrorDetails for AbpRemoteCallException. --- .../Volo/Abp/ExceptionHandling/IHasErrorCode.cs | 2 +- .../Volo/Abp/ExceptionHandling/IHasErrorDetails.cs | 2 +- .../Volo/Abp/Http/Client/AbpRemoteCallException.cs | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Volo.Abp.Core/Volo/Abp/ExceptionHandling/IHasErrorCode.cs b/src/Volo.Abp.Core/Volo/Abp/ExceptionHandling/IHasErrorCode.cs index 35f31b1aa0..438d5deec0 100644 --- a/src/Volo.Abp.Core/Volo/Abp/ExceptionHandling/IHasErrorCode.cs +++ b/src/Volo.Abp.Core/Volo/Abp/ExceptionHandling/IHasErrorCode.cs @@ -2,6 +2,6 @@ { public interface IHasErrorCode { - string Code { get; set; } + string Code { get; } } } \ No newline at end of file diff --git a/src/Volo.Abp.Core/Volo/Abp/ExceptionHandling/IHasErrorDetails.cs b/src/Volo.Abp.Core/Volo/Abp/ExceptionHandling/IHasErrorDetails.cs index b2a6826fe9..e36778088f 100644 --- a/src/Volo.Abp.Core/Volo/Abp/ExceptionHandling/IHasErrorDetails.cs +++ b/src/Volo.Abp.Core/Volo/Abp/ExceptionHandling/IHasErrorDetails.cs @@ -2,6 +2,6 @@ namespace Volo.Abp.ExceptionHandling { public interface IHasErrorDetails { - string Details { get; set; } + string Details { get; } } } \ No newline at end of file diff --git a/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpRemoteCallException.cs b/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpRemoteCallException.cs index 8093dba1cf..d5cbc10c0b 100644 --- a/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpRemoteCallException.cs +++ b/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/AbpRemoteCallException.cs @@ -1,11 +1,16 @@ using System; using System.Runtime.Serialization; +using Volo.Abp.ExceptionHandling; namespace Volo.Abp.Http.Client { [Serializable] - public class AbpRemoteCallException : AbpException + public class AbpRemoteCallException : AbpException, IHasErrorCode, IHasErrorDetails { + public string Code => Error?.Code; + + public string Details => Error?.Details; + public RemoteServiceErrorInfo Error { get; set; } public AbpRemoteCallException()