try catch vari (sopratutto x ocndizione out of range array in lettura assi e path/nome)
This commit is contained in:
@@ -33,8 +33,10 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
answ = OSAI_ref.O_RW_Byte(bWrite, MemType, memIndex, memOrderStart, ref Value);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, "Eccezione in OsaiMemRW_Byte");
|
||||
}
|
||||
}
|
||||
parentForm.commPlcActive = false;
|
||||
return answ;
|
||||
@@ -57,8 +59,10 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
answ = OSAI_ref.O_RW_Word(bWrite, MemType, memIndex, ref Value);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, "Eccezione in OsaiMemRW_Word");
|
||||
}
|
||||
}
|
||||
parentForm.commPlcActive = false;
|
||||
return answ;
|
||||
@@ -81,8 +85,10 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
answ = OSAI_ref.O_RW_DWord(bWrite, MemType, memIndex, ref Value);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, "Eccezione in OsaiMemRW_DWord");
|
||||
}
|
||||
}
|
||||
parentForm.commPlcActive = false;
|
||||
return answ;
|
||||
@@ -105,8 +111,10 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
answ = OSAI_ref.O_RW_Short(bWrite, MemType, memIndex, ref Value);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, "Eccezione in OsaiMemRW_Short");
|
||||
}
|
||||
}
|
||||
parentForm.commPlcActive = false;
|
||||
return answ;
|
||||
@@ -129,8 +137,10 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
answ = OSAI_ref.O_RW_Integer(bWrite, MemType, memIndex, ref Value);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, "Eccezione in OsaiMemRW_Integer");
|
||||
}
|
||||
}
|
||||
parentForm.commPlcActive = false;
|
||||
return answ;
|
||||
@@ -153,8 +163,10 @@ namespace MTC_Adapter
|
||||
parentForm.commPlcActive = true;
|
||||
answ = OSAI_ref.O_RW_Double(bWrite, MemType, memIndex, ref Value);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, "Eccezione in OsaiMemRW_Double");
|
||||
}
|
||||
}
|
||||
parentForm.commPlcActive = false;
|
||||
return answ;
|
||||
@@ -548,8 +560,10 @@ namespace MTC_Adapter
|
||||
}
|
||||
fatto = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, "Eccezione in readOverrides");
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -612,8 +626,10 @@ namespace MTC_Adapter
|
||||
}
|
||||
fatto = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, "Eccezione in procCncAlarm");
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -1024,9 +1040,16 @@ namespace MTC_Adapter
|
||||
{
|
||||
// salvo!!! come path#nome
|
||||
axisDict.Add(string.Format("{0}#{1}", i, axisTable[j]), currId);
|
||||
// salvo (per ID) descr asse e processo corrente!
|
||||
vettAxis[currId].mAxDescr.Value = axisTable[j];
|
||||
vettAxis[currId].mAxMainProc.Value = i;
|
||||
try
|
||||
{
|
||||
// salvo (per ID) descr asse e processo corrente!
|
||||
vettAxis[currId].mAxDescr.Value = axisTable[j];
|
||||
vettAxis[currId].mAxMainProc.Value = i;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, string.Format("Eccezione in salvataggio nome/path asse num {0}", currId));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user