Attempt to handle MYSQL error fetching assets

afrisby
Brian McBee 2007-11-26 16:39:00 +00:00
parent 011ad46960
commit 232613638f
1 changed files with 17 additions and 10 deletions

View File

@ -76,6 +76,8 @@ namespace OpenSim.Framework.Data.MySQL
_dbConnection.Connection); _dbConnection.Connection);
MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16); MySqlParameter p = cmd.Parameters.Add("?id", MySqlDbType.Binary, 16);
p.Value = assetID.GetBytes(); p.Value = assetID.GetBytes();
try
{
using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow)) using (MySqlDataReader dbReader = cmd.ExecuteReader(CommandBehavior.SingleRow))
{ {
if (dbReader.Read()) if (dbReader.Read())
@ -91,6 +93,11 @@ namespace OpenSim.Framework.Data.MySQL
} }
} }
} }
catch (Exception)
{
MainLog.Instance.Warn("ASSETS", "MySql failure fetching asset");
}
}
return asset; return asset;
} }