Merge remote-tracking branch 'origin/master'

This commit is contained in:
Federico Barresi
2020-01-17 14:49:12 +01:00

View File

@@ -222,7 +222,8 @@ namespace Sharp7.Rx
if (result != 0)
{
await EvaluateErrorCode(result);
throw new InvalidOperationException($"Error reading {operand}{dBNr}:{startByteAddress}->{bytesToRead}");
var errorText = this.sharp7.ErrorText(result);
throw new InvalidOperationException($"Error reading {operand}{dBNr}:{startByteAddress}->{bytesToRead} ({errorText})");
}
var retBuffer = new byte[bytesToRead];