Exemple #1
0
        public LogException(Exception ex)
            : base()
        {
            machineName = Environment.MachineName;
            operatingSystem = Environment.OSVersion.ToString();
            version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            this.callerVersion = "";

            message = ex.Message;
            source = ex.Source;
            stackTrace = ex.StackTrace;
            innerException = new LogExceptionChild(ex.InnerException);
        }
Exemple #2
0
        internal LogExceptionChild(Exception ex)
        {
            if (ex != null)
            {
                Exception e = ex;
                do
                {
                    message = ex.Message;
                    source = ex.Source;
                    stackTrace = ex.StackTrace;
                    innerException = new LogExceptionChild(e.InnerException);

                    e = e.InnerException;
                } while (e != null);
            }
        }