diff --git a/VectoCore/Exceptions/VectoExceptions.cs b/VectoCore/Exceptions/VectoExceptions.cs index 108e13935205d2aa00d2bb8ccfa7a41c08c999f1..3019e44a73a2981d9d4dff0dba3237e1170d2f58 100644 --- a/VectoCore/Exceptions/VectoExceptions.cs +++ b/VectoCore/Exceptions/VectoExceptions.cs @@ -1,21 +1,35 @@ using System; using System.IO; using JetBrains.Annotations; +using NLog; namespace TUGraz.VectoCore.Exceptions { public class VectoException : Exception { - public VectoException(string message) : base(message) {} - public VectoException(string message, Exception innerException) : base(message, innerException) {} + public VectoException(string message) : base(message) + { + LogManager.Flush(); + } + + public VectoException(string message, Exception innerException) : base(message, innerException) + { + LogManager.Flush(); + } [StringFormatMethod("message")] public VectoException(string message, params object[] args) - : base(string.Format(message, args)) {} + : base(string.Format(message, args)) + { + LogManager.Flush(); + } [StringFormatMethod("message")] protected VectoException(string message, Exception inner, params object[] args) - : base(string.Format(message, args), inner) {} + : base(string.Format(message, args), inner) + { + LogManager.Flush(); + } } public abstract class FileIOException : VectoException