Merge pull request #328 from k0rd/general-devel

Added a more descriptive error message when database dlls are missing.
This commit is contained in:
Deathmax 2012-01-20 17:34:30 -08:00
commit dac1e6c282

View file

@ -39,7 +39,15 @@ 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)