add error handling

master
Christopher 2020-07-09 01:05:02 +02:00
parent d74469f84e
commit 0e6e7bbb8e
1 changed files with 10 additions and 3 deletions

View File

@ -37,9 +37,16 @@ namespace OpenSim.Modules.DataValue.Storage
m_timer.Elapsed += mysqlping;
m_timer.Start();
m_mySQLClient = new MySqlConnection(m_connectionString);
m_mySQLClient.Open();
createEmptyTable();
try
{
m_mySQLClient = new MySqlConnection(m_connectionString);
m_mySQLClient.Open();
createEmptyTable();
}
catch(Exception _error)
{
m_log.Error("[MySQL] " + m_connectionString + " : " + _error.Message);
}
}
private void mysqlping(object sender, ElapsedEventArgs e)