1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-13 16:48:27 -05:00

Redid the logging system

This commit is contained in:
RaidMax
2017-05-27 18:29:20 -05:00
parent c1faf8a02e
commit ac7908de91
23 changed files with 191 additions and 216 deletions

View File

@ -13,18 +13,7 @@ namespace SharedLibrary
{
FileName = FN;
DBCon = String.Format("Data Source={0}", FN);
try
{
Con = new SQLiteConnection(DBCon);
}
catch (DllNotFoundException)
{
Console.WriteLine("Fatal Error: could not locate the SQLite DLL(s)!\nEnsure they are located in the 'lib' folder");
Utilities.Wait(5);
Environment.Exit(0);
}
Con = new SQLiteConnection(DBCon);
Open = false;
Init();
}
@ -130,6 +119,7 @@ namespace SharedLibrary
catch (Exception E)
{
// fixme: this needs to have a reference to a logger..
Console.WriteLine(E.Message);
Console.WriteLine(E.StackTrace);
Console.WriteLine(Request);
@ -205,7 +195,7 @@ namespace SharedLibrary
}
catch (Exception e)
{
Console.WriteLine(e.Message + " GetDataTable");
Console.WriteLine($"Line 198: {e.Message}");
return new DataTable();
}
return dt;