예제 #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);
     }
 }