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

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

surround obtaining vecto version with try-catch block

parent 92de0f92
No related branches found
No related tags found
No related merge requests found
......@@ -210,8 +210,12 @@ namespace TUGraz.VectoCore.Utils
return;
}
if (addVersionHeader) {
var vectodll = Assembly.LoadFrom(AppDomain.CurrentDomain.BaseDirectory + "VectoCore.dll").GetName();
writer.WriteLine("# VECTO {0} - {1}", vectodll.Version, DateTime.Now.ToString("dd.MM.yyyy HH:mm"));
try {
var vectodll = Assembly.LoadFrom(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "VectoCore.dll")).GetName();
writer.WriteLine("# VECTO {0} - {1}", vectodll.Version, DateTime.Now.ToString("dd.MM.yyyy HH:mm"));
} catch (Exception) {
writer.WriteLine("# VECTO {0} - {1}", "Unknown", DateTime.Now.ToString("dd.MM.yyyy HH:mm"));
}
}
var header = table.Columns.Cast<DataColumn>().Select(col => col.Caption ?? col.ColumnName);
writer.WriteLine(string.Join(Delimiter, header));
......
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