mirror of
https://github.com/evopro-ag/Sharp7Reactive.git
synced 2025-12-16 03:42:51 +00:00
Add additional hints to errors
This commit is contained in:
@@ -102,15 +102,6 @@ public class Sharp7Plc : IPlc
|
||||
});
|
||||
}
|
||||
|
||||
private S7VariableAddress ParseAndVerify(string variableName, Type type)
|
||||
{
|
||||
var address = varaibleNameParser.Parse(variableName);
|
||||
if (!address.MatchesType(type))
|
||||
throw new DataTypeMissmatchException($"Address \"{variableName}\" does not match type {type}.", type, address);
|
||||
|
||||
return address;
|
||||
}
|
||||
|
||||
public Task<TValue> GetValue<TValue>(string variableName)
|
||||
{
|
||||
return GetValue<TValue>(variableName, CancellationToken.None);
|
||||
@@ -222,6 +213,15 @@ public class Sharp7Plc : IPlc
|
||||
return Unit.Default;
|
||||
}
|
||||
|
||||
private S7VariableAddress ParseAndVerify(string variableName, Type type)
|
||||
{
|
||||
var address = varaibleNameParser.Parse(variableName);
|
||||
if (!address.MatchesType(type))
|
||||
throw new DataTypeMissmatchException($"Address \"{variableName}\" does not match type {type}.", type, address);
|
||||
|
||||
return address;
|
||||
}
|
||||
|
||||
private void PrintAndResetPerformanceStatistik()
|
||||
{
|
||||
if (performanceCoutner.Count == performanceCoutner.Capacity)
|
||||
|
||||
Reference in New Issue
Block a user