Merge pull request #328 from k0rd/general-devel
Added a more descriptive error message when database dlls are missing.
This commit is contained in:
commit
dac1e6c282
1 changed files with 9 additions and 1 deletions
|
|
@ -39,8 +39,16 @@ namespace TShockAPI.DB
|
||||||
db.GetSqlType() == SqlType.Sqlite
|
db.GetSqlType() == SqlType.Sqlite
|
||||||
? (IQueryBuilder) new SqliteQueryCreator()
|
? (IQueryBuilder) new SqliteQueryCreator()
|
||||||
: new MysqlQueryCreator());
|
: new MysqlQueryCreator());
|
||||||
|
try{
|
||||||
creator.EnsureExists(table);
|
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)
|
public Ban GetBanByIp(string ip)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue