Пример #1
0
 /// <summary>
 /// Initialises a new instance of the Yaircc.ErrorLog class.
 /// </summary>
 /// <param name="exception">The exception that triggered the log to be created.</param>
 public ErrorLog(Exception exception)
 {
     this.exception          = new SerializableException(exception);
     this.osVersion          = Environment.OSVersion.ToString();
     this.applicationVersion = Application.ProductVersion;
     this.creationDateTime   = DateTime.Now;
     this.appVersion         = Assembly.GetExecutingAssembly().GetName().Version.ToString();
 }
Пример #2
0
 /// <summary>
 /// Initialises a new instance of the Yaircc.ErrorLog class.
 /// </summary>
 /// <param name="exception">The exception that triggered the log to be created.</param>
 public ErrorLog(Exception exception)
 {
     this.exception = new SerializableException(exception);
     this.osVersion = Environment.OSVersion.ToString();
     this.applicationVersion = Application.ProductVersion;
     this.creationDateTime = DateTime.Now;
     this.appVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
 }
Пример #3
0
 /// <summary>
 /// Initialises a new instance of the <see cref="SerializableException"/> class.
 /// </summary>
 /// <param name="ex">The exception that occurred.</param>
 public SerializableException(Exception ex)
 {
     this.stackTrace = ex.StackTrace;
     this.message = ex.Message;
     if (ex.InnerException != null)
     {
         this.innerException = new SerializableException(ex.InnerException);
     }
 }
Пример #4
0
 /// <summary>
 /// Initialises a new instance of the <see cref="SerializableException"/> class.
 /// </summary>
 /// <param name="ex">The exception that occurred.</param>
 public SerializableException(Exception ex)
 {
     this.stackTrace = ex.StackTrace;
     this.message    = ex.Message;
     if (ex.InnerException != null)
     {
         this.innerException = new SerializableException(ex.InnerException);
     }
 }