I have a code block as follows:
try
{
File.Copy("output\\SQLcache.sql.tmp", "output\\SQLcache.sql");
File.Delete("output\\SQLcache.sql.tmp");
}
catch (Exception ex)
{
}
I get a warning every time that ex is declared but never used. I don't want or need to use it, I just want to catch the exception so the whole program does not crash in the case that one of the above files is deleted or missing.
try
{
File.Copy("output\\SQLcache.sql.tmp", "output\\SQLcache.sql");
File.Delete("output\\SQLcache.sql.tmp");
}
catch (Exception ex)
{
}
I get a warning every time that ex is declared but never used. I don't want or need to use it, I just want to catch the exception so the whole program does not crash in the case that one of the above files is deleted or missing.