Added a more descriptive error message when database dlls are missing.
This commit is contained in:
parent
290fe1a1da
commit
7dcac918ec
1 changed files with 9 additions and 1 deletions
|
|
@ -39,7 +39,15 @@ namespace TShockAPI.DB
|
|||
db.GetSqlType() == SqlType.Sqlite
|
||||
? (IQueryBuilder) new SqliteQueryCreator()
|
||||
: new MysqlQueryCreator());
|
||||
try{
|
||||
creator.EnsureExists(table);
|
||||
}
|
||||
catch (DllNotFoundException ex)
|
||||
{
|
||||
System.Console.WriteLine("Possible problem with your database - is Sqlite3.dll present?");
|
||||
throw new Exception("Could not find a database library (probably Sqlite3.dll)");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Ban GetBanByIp(string ip)
|
||||
|
|
@ -145,4 +153,4 @@ namespace TShockAPI.DB
|
|||
Reason = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue