mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
✨ support provider、Extensions Exceptions 多语言
This commit is contained in:
@ -45,7 +45,7 @@ namespace FreeSql.MsAccess
|
||||
{
|
||||
|
||||
internal MsAccessConnectionPool _pool;
|
||||
public string Name { get; set; } = "Microsoft Access OleDbConnection 对象池";
|
||||
public string Name { get; set; } = $"Microsoft Access OleDbConnection {CoreStrings.S_ObjectPool}";
|
||||
public int PoolSize { get; set; } = 100;
|
||||
public TimeSpan SyncGetTimeout { get; set; } = TimeSpan.FromSeconds(30);
|
||||
public TimeSpan IdleTimeout { get; set; } = TimeSpan.Zero;
|
||||
@ -120,8 +120,8 @@ namespace FreeSql.MsAccess
|
||||
|
||||
if (obj.Value == null)
|
||||
{
|
||||
_pool.SetUnavailable(new Exception("连接字符串错误"), obj.LastGetTimeCopy);
|
||||
throw new Exception($"【{this.Name}】连接字符串错误,请检查。");
|
||||
_pool.SetUnavailable(new Exception(CoreStrings.S_ConnectionStringError), obj.LastGetTimeCopy);
|
||||
throw new Exception(CoreStrings.S_ConnectionStringError_Check(this.Name));
|
||||
}
|
||||
|
||||
if (obj.Value.State != ConnectionState.Open || DateTime.Now.Subtract(obj.LastReturnTime).TotalSeconds > 60 && obj.Value.Ping() == false)
|
||||
@ -151,8 +151,8 @@ namespace FreeSql.MsAccess
|
||||
|
||||
if (obj.Value == null)
|
||||
{
|
||||
_pool.SetUnavailable(new Exception("连接字符串错误"), obj.LastGetTimeCopy);
|
||||
throw new Exception($"【{this.Name}】连接字符串错误,请检查。");
|
||||
_pool.SetUnavailable(new Exception(CoreStrings.S_ConnectionStringError), obj.LastGetTimeCopy);
|
||||
throw new Exception(CoreStrings.S_ConnectionStringError_Check(this.Name));
|
||||
}
|
||||
|
||||
if (obj.Value.State != ConnectionState.Open || DateTime.Now.Subtract(obj.LastReturnTime).TotalSeconds > 60 && (await obj.Value.PingAsync()) == false)
|
||||
|
Reference in New Issue
Block a user