CollectExceptionMessages() 개인적인 정적인 메소드

private static CollectExceptionMessages ( Exception ex ) : string
ex System.Exception
리턴 string
예제 #1
0
        private static IDictionary <string, object> GetPropertiesFromException(Exception e, IDictionary <string, object> props)
        {
            props.Add("Messages", Utility.CollectExceptionMessages(e));
            var epath = string.Empty;

            while (e != null)
            {
                epath += e.GetType().Name + "/";
                var data = e.Data;
                foreach (var key in data.Keys)
                {
                    props.Add(epath + key, data[key]);
                }
                e = e.InnerException;
            }
            return(props);
        }
예제 #2
0
        private static IDictionary <string, object> GetPropertiesFromException(Exception e, IDictionary <string, object> props)
        {
            props.Add("Messages", Utility.CollectExceptionMessages(e));
            var epath = string.Empty;

            while (e != null)
            {
                epath += e.GetType().Name + "/";
                var data = e.Data;
                foreach (var key in data.Keys)
                {
                    props.Add(epath + key, data[key]);
                }

                var rtle = e as ReflectionTypeLoadException;
                if (rtle != null)
                {
                    props.Add("Types", string.Join(", ", rtle.Types.Select(x => x.FullName)));
                }

                e = e.InnerException;
            }
            return(props);
        }