Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 7d1ca986 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

flush logs in case an exception occurs

parent 6db63964
No related branches found
No related tags found
No related merge requests found
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment