CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
WcfErrorInfo.cs
Go to the documentation of this file.
1#if !NETFX_CORE
2//-----------------------------------------------------------------------
3// <copyright file="WcfErrorInfo.cs" company="Marimer LLC">
4// Copyright (c) Marimer LLC. All rights reserved.
5// Website: https://cslanet.com
6// </copyright>
7// <summary>Message containing details about any</summary>
8//-----------------------------------------------------------------------
9using System;
10using System.Runtime.Serialization;
11
13{
18 [DataContract]
19 public class WcfErrorInfo
20 {
24 [DataMember]
25 public string ExceptionTypeName { get; set; }
29 [DataMember]
30 public string Message { get; set; }
34 [DataMember]
35 public string StackTrace { get; set; }
39 [DataMember]
40 public string Source { get; set; }
44 [DataMember]
45 public string TargetSiteName { get; set; }
51 [DataMember]
52 public WcfErrorInfo InnerError { get; private set; }
53
60 public WcfErrorInfo(Exception ex)
61 {
62 this.ExceptionTypeName = ex.GetType().FullName;
63 this.Message = ex.Message;
64 this.StackTrace = ex.StackTrace;
65 this.Source = ex.Source;
66 if (ex.TargetSite != null)
67 this.TargetSiteName = ex.TargetSite.Name;
68 if (ex.InnerException != null)
69 this.InnerError = new WcfErrorInfo(ex.InnerException);
70 }
71 }
72}
73#endif
Message containing details about any server-side exception.
Definition: WcfErrorInfo.cs:20
WcfErrorInfo(Exception ex)
Creates an instance of the object.
Definition: WcfErrorInfo.cs:60
string ExceptionTypeName
Type name of the exception object.
Definition: WcfErrorInfo.cs:25
string Message
Message from the exception object.
Definition: WcfErrorInfo.cs:30
string Source
Source of the exception object.
Definition: WcfErrorInfo.cs:40
string StackTrace
Stack trace from the exception object.
Definition: WcfErrorInfo.cs:35
WcfErrorInfo InnerError
WcfErrorInfo object containing information about any inner exception of the original exception.
Definition: WcfErrorInfo.cs:52
string TargetSiteName
Target site name from the exception object.
Definition: WcfErrorInfo.cs:45