diff --git a/Sharp7.Rx/Sharp7Connector.cs b/Sharp7.Rx/Sharp7Connector.cs index 8a648c7..c9eba40 100644 --- a/Sharp7.Rx/Sharp7Connector.cs +++ b/Sharp7.Rx/Sharp7Connector.cs @@ -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];