Beispiel #1
0
        public ThrowableLog(Exception t)
        {
            time = DateTime.Now;

            threadLog = new ThreadLog(Thread.CurrentThread);

            throwable = t;

            throwableClass = t.GetType().FullName;
            message        = t.Message;

            if (t.InnerException != t && t.InnerException != null)
            {
                cause = new ThrowableLog(t.InnerException);
            }
            else
            {
                cause = null;
            }


            applicationName = currentApplicationName;
            stackTrace      = StackTraceElement.BuildElements(new System.Diagnostics.StackTrace(t));
            systemUser      = new SystemUser();
        }
Beispiel #2
0
 public ThrowableLog(
     ObjectId id,
     string applicationName,
     string throwableClass,
     string message,
     ThrowableLog cause,
     List <StackTraceElement> stackTrace,
     ThreadLog threadLog,
     DateTime time,
     SystemUser systemUser)
 {
     this.id = id;
     this.applicationName = applicationName;
     this.throwableClass  = throwableClass;
     this.message         = message;
     this.cause           = cause;
     this.stackTrace      = new ReadOnlyCollection <StackTraceElement>(stackTrace);
     this.threadLog       = threadLog;
     this.time            = time;
     this.systemUser      = systemUser;
     throwable            = null;
 }