Compare commits

...

3 Commits

Author SHA1 Message Date
Samuele Locatelli 21eec2959c Merge branch 'release/fixSe' 2021-08-19 11:33:57 +02:00
Samuele Locatelli 2011d1104c Update s evitare eccezioni in setRSV se key empty 2021-08-19 11:33:25 +02:00
Samuele Locatelli f6fb374c23 Merge tag 'ReloadAppConfFix' into develop
Riprostinato metodo init appConf
2021-08-11 15:27:23 +02:00
2 changed files with 38 additions and 10 deletions
+19 -5
View File
@@ -2144,14 +2144,28 @@ namespace SteamWare.IO
public bool setRSV(string chiave, string valore) public bool setRSV(string chiave, string valore)
{ {
bool answ = false; bool answ = false;
try if (!string.IsNullOrEmpty(chiave))
{ {
cache.StringSet(chiave, valore); if (!string.IsNullOrEmpty(valore))
answ = true; {
try
{
cache.StringSet(chiave, valore);
answ = true;
}
catch (Exception exc)
{
Logging.Instance.Error(string.Format("Eccezzione in setRSV:{0}{1}", Environment.NewLine, exc));
}
}
else
{
Logging.Instance.Error("Errore: valore non valido (vuoto) in setRSV");
}
} }
catch (Exception exc) else
{ {
Logging.Instance.Error(string.Format("Eccezzione in setRSV:{0}{1}", Environment.NewLine, exc)); Logging.Instance.Error("Errore: chiave non valida (vuota) in setRSV");
} }
return answ; return answ;
} }
+19 -5
View File
@@ -2161,14 +2161,28 @@ namespace SteamWare
public bool setRSV(string chiave, string valore) public bool setRSV(string chiave, string valore)
{ {
bool answ = false; bool answ = false;
try if (!string.IsNullOrEmpty(chiave))
{ {
cache.StringSet(chiave, valore); if (!string.IsNullOrEmpty(valore))
answ = true; {
try
{
cache.StringSet(chiave, valore);
answ = true;
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezzione in setRSV | chiave: {chiave} | valore: {valore}{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
}
else
{
logger.lg.scriviLog("Errore: valore non valido (vuoto) in setRSV", tipoLog.ERROR);
}
} }
catch (Exception exc) else
{ {
logger.lg.scriviLog(string.Format($"Errore in setRSV | chiave: {chiave} | valore: {valore}{Environment.NewLine}{exc}"), tipoLog.EXCEPTION); logger.lg.scriviLog("Errore: chiave non valida (vuota) in setRSV", tipoLog.ERROR);
} }
return answ; return answ;
} }