From 465c154d4fd453662b700a5a5312711bfde4132b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 27 Apr 2018 22:17:49 +0300 Subject: [PATCH] Added BusinessException.WithData --- src/Volo.Abp.Core/Volo/Abp/BusinessException.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Volo.Abp.Core/Volo/Abp/BusinessException.cs b/src/Volo.Abp.Core/Volo/Abp/BusinessException.cs index fbf1595fe0..1968fea1ee 100644 --- a/src/Volo.Abp.Core/Volo/Abp/BusinessException.cs +++ b/src/Volo.Abp.Core/Volo/Abp/BusinessException.cs @@ -19,7 +19,11 @@ namespace Volo.Abp } - public BusinessException(string code = null, string message = null, string details = null, Exception innerException = null) + public BusinessException( + string code = null, + string message = null, + string details = null, + Exception innerException = null) : base(message, innerException) { Code = code; @@ -34,5 +38,11 @@ namespace Volo.Abp { } + + public BusinessException WithData(string name, object value) + { + Data[name] = value; + return this; + } } } \ No newline at end of file